summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-12 20:32:40 +0100
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-12 20:32:40 +0100
commit7a98f0bdc00ae929708b588cc02714c4cd7f09ee (patch)
tree594761353d3f437c039427c680db6911ba00c859
parentc739b8e0d6258276100da68c2ba1e2ecb7e8bde1 (diff)
downloadgitlab-ce-7a98f0bdc00ae929708b588cc02714c4cd7f09ee.tar.gz
Revert "Just fix (hack) specs"
This reverts commit c739b8e0d6258276100da68c2ba1e2ecb7e8bde1.
-rw-r--r--spec/models/ci/build_spec.rb2
-rw-r--r--spec/models/environment_status_spec.rb2
-rw-r--r--spec/services/update_deployment_service_spec.rb12
-rw-r--r--spec/support/helpers/cycle_analytics_helpers.rb2
4 files changed, 9 insertions, 9 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 9918c4ba776..6849bc6db7a 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -800,7 +800,7 @@ describe Ci::Build do
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 }
diff --git a/spec/models/environment_status_spec.rb b/spec/models/environment_status_spec.rb
index 27c0d09914a..90f7e4a4590 100644
--- a/spec/models/environment_status_spec.rb
+++ b/spec/models/environment_status_spec.rb
@@ -94,7 +94,7 @@ describe EnvironmentStatus do
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 }
diff --git a/spec/services/update_deployment_service_spec.rb b/spec/services/update_deployment_service_spec.rb
index 124ad6e7581..3c55dd9659a 100644
--- a/spec/services/update_deployment_service_spec.rb
+++ b/spec/services/update_deployment_service_spec.rb
@@ -10,7 +10,7 @@ describe UpdateDeploymentService do
tag: false,
environment: 'production',
options: { environment: options },
- project: project).reload
+ project: project)
end
let(:project) { create(:project, :repository) }
@@ -99,7 +99,7 @@ describe UpdateDeploymentService do
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') }
@@ -111,7 +111,7 @@ describe UpdateDeploymentService do
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') }
@@ -123,14 +123,14 @@ describe UpdateDeploymentService do
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
@@ -160,7 +160,7 @@ describe UpdateDeploymentService do
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
diff --git a/spec/support/helpers/cycle_analytics_helpers.rb b/spec/support/helpers/cycle_analytics_helpers.rb
index 0b6c7328c6e..ecefdc23811 100644
--- a/spec/support/helpers/cycle_analytics_helpers.rb
+++ b/spec/support/helpers/cycle_analytics_helpers.rb
@@ -115,7 +115,7 @@ module CycleAnalyticsHelpers
name: 'dummy',
stage: 'dummy',
pipeline: dummy_pipeline(project),
- protected: false).reload
+ protected: false)
end
def mock_gitaly_multi_action_dates(repository, commit_time)