summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-03-07 13:46:43 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-03-07 13:46:43 +0000
commitb809f434699f3bc2adb84d0cb59f575cb44b5984 (patch)
treef200aa6028a0fd278729b9923d1af5ee33a835d3 /spec/models
parent1da5a103ace9c346758e9525d7f0fa55bab13599 (diff)
parentc277aac9dc1a72eb8b4584ad217996a9d7daaf14 (diff)
downloadgitlab-ce-b809f434699f3bc2adb84d0cb59f575cb44b5984.tar.gz
Merge branch 'mr-commit-optimization' into 'master'
Use persisted/memoized value for MRs sha's instead of doing git lookups See merge request gitlab-org/gitlab-ce!17555
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/environment_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb
index ceb570ac777..412eca4a56b 100644
--- a/spec/models/environment_spec.rb
+++ b/spec/models/environment_spec.rb
@@ -142,15 +142,15 @@ describe Environment do
let(:commit) { project.commit.parent }
it 'returns deployment id for the environment' do
- expect(environment.first_deployment_for(commit)).to eq deployment1
+ expect(environment.first_deployment_for(commit.id)).to eq deployment1
end
it 'return nil when no deployment is found' do
- expect(environment.first_deployment_for(head_commit)).to eq nil
+ expect(environment.first_deployment_for(head_commit.id)).to eq nil
end
it 'returns a UTF-8 ref' do
- expect(environment.first_deployment_for(commit).ref).to be_utf8
+ expect(environment.first_deployment_for(commit.id).ref).to be_utf8
end
end