diff options
Diffstat (limited to 'spec/models/deployment_spec.rb')
-rw-r--r-- | spec/models/deployment_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb index ab7e12cd43c..86dfa586862 100644 --- a/spec/models/deployment_spec.rb +++ b/spec/models/deployment_spec.rb @@ -520,6 +520,21 @@ describe Deployment do end end + describe '#create_ref' do + let(:deployment) { build(:deployment) } + + subject { deployment.create_ref } + + it 'creates a ref using the sha' do + expect(deployment.project.repository).to receive(:create_ref).with( + deployment.sha, + "refs/environments/#{deployment.environment.name}/deployments/#{deployment.iid}" + ) + + subject + end + end + describe '#playable_build' do subject { deployment.playable_build } |