diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-09-21 00:21:43 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-09-21 00:29:17 +0300 |
commit | 0a2649ce694a0ba70fa6c4caa84ea21dd53446c8 (patch) | |
tree | 4bcba7e734c719d9be45a4e3f00a0e5f5ee2a949 /spec/services/create_deployment_service_spec.rb | |
parent | b5dc0c6da55c7066746ee365c0248e82c849c944 (diff) |
Fix build.
Diffstat (limited to 'spec/services/create_deployment_service_spec.rb')
-rw-r--r-- | spec/services/create_deployment_service_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/create_deployment_service_spec.rb b/spec/services/create_deployment_service_spec.rb index 3a565fa44b5..cfcf1dc4ab8 100644 --- a/spec/services/create_deployment_service_spec.rb +++ b/spec/services/create_deployment_service_spec.rb @@ -190,7 +190,7 @@ describe CreateDeploymentService, services: true do time = Time.now Timecop.freeze(time) { service.execute } - expect(merge_request.metrics.first_deployed_to_production_at).to be_within(1.second).of(time) + expect(merge_request.reload.metrics.first_deployed_to_production_at).to be_within(1.second).of(time) end it "doesn't set the time if the deploy's environment is not 'production'" do @@ -198,7 +198,7 @@ describe CreateDeploymentService, services: true do service = described_class.new(project, user, staging_params) service.execute - expect(merge_request.metrics.first_deployed_to_production_at).to be_nil + expect(merge_request.reload.metrics.first_deployed_to_production_at).to be_nil end it 'does not raise errors if the merge request does not have a metrics record' do @@ -231,7 +231,7 @@ describe CreateDeploymentService, services: true do # Previous deploy time = Time.now Timecop.freeze(time) { service.execute } - merge_request.metrics.update(first_deployed_to_production_at: nil) + merge_request.reload.metrics.update(first_deployed_to_production_at: nil) expect(merge_request.reload.metrics.first_deployed_to_production_at).to be_nil |