Skip to content
Snippets Groups Projects
Commit 7a98f0bd authored by Kamil Trzcińśki's avatar Kamil Trzcińśki
Browse files

Revert "Just fix (hack) specs"

This reverts commit c739b8e0.
parent c739b8e0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -800,7 +800,7 @@
end
 
describe 'state transition as a deployable' do
let!(:build) { create(:ci_build, :start_review_app).reload }
let!(:build) { create(:ci_build, :start_review_app) }
let(:deployment) { build.deployment }
let(:environment) { deployment.environment }
 
Loading
Loading
Loading
Loading
@@ -94,7 +94,7 @@
describe '.build_environments_status' do
subject { described_class.send(:build_environments_status, merge_request, user, sha) }
 
let!(:build) { create(:ci_build, :deploy_to_production, pipeline: pipeline).reload }
let!(:build) { create(:ci_build, :deploy_to_production, pipeline: pipeline) }
let(:environment) { build.deployment.environment }
let(:user) { project.owner }
 
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@
tag: false,
environment: 'production',
options: { environment: options },
project: project).reload
project: project)
end
 
let(:project) { create(:project, :repository) }
Loading
Loading
@@ -99,7 +99,7 @@
ref: 'master',
environment: 'production',
project: project,
options: { environment: { name: 'production', url: 'http://review/$CI_COMMIT_REF_NAME' } }).reload
options: { environment: { name: 'production', url: 'http://review/$CI_COMMIT_REF_NAME' } })
end
 
it { is_expected.to eq('http://review/master') }
Loading
Loading
@@ -111,7 +111,7 @@
ref: 'master',
environment: 'prod-slug',
project: project,
options: { environment: { name: 'prod-slug', url: 'http://review/$CI_ENVIRONMENT_SLUG' } }).reload
options: { environment: { name: 'prod-slug', url: 'http://review/$CI_ENVIRONMENT_SLUG' } })
end
 
it { is_expected.to eq('http://review/prod-slug') }
Loading
Loading
@@ -123,14 +123,14 @@
yaml_variables: [{ key: :APP_HOST, value: 'host' }],
environment: 'production',
project: project,
options: { environment: { name: 'production', url: 'http://review/$APP_HOST' } }).reload
options: { environment: { name: 'production', url: 'http://review/$APP_HOST' } })
end
 
it { is_expected.to eq('http://review/host') }
end
 
context 'when yaml environment does not have url' do
let(:job) { create(:ci_build, environment: 'staging', project: project).reload }
let(:job) { create(:ci_build, environment: 'staging', project: project) }
 
it 'returns the external_url from persisted environment' do
is_expected.to be_nil
Loading
Loading
@@ -160,7 +160,7 @@
tag: false,
environment: 'staging',
options: { environment: { name: 'staging' } },
project: project).reload
project: project)
end
 
it "doesn't set the time if the deploy's environment is not 'production'" do
Loading
Loading
Loading
Loading
@@ -115,7 +115,7 @@ def new_dummy_job(user, project, environment)
name: 'dummy',
stage: 'dummy',
pipeline: dummy_pipeline(project),
protected: false).reload
protected: false)
end
 
def mock_gitaly_multi_action_dates(repository, commit_time)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment