diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /spec/services/deployments/update_environment_service_spec.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'spec/services/deployments/update_environment_service_spec.rb')
-rw-r--r-- | spec/services/deployments/update_environment_service_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/services/deployments/update_environment_service_spec.rb b/spec/services/deployments/update_environment_service_spec.rb index 0a93e300eb6..79bf0d972d4 100644 --- a/spec/services/deployments/update_environment_service_spec.rb +++ b/spec/services/deployments/update_environment_service_spec.rb @@ -79,6 +79,27 @@ RSpec.describe Deployments::UpdateEnvironmentService, feature_category: :continu expect(subject.execute).to eq(deployment) end + context 'when deployable is bridge job' do + let(:job) do + create(:ci_bridge, + :with_deployment, + pipeline: pipeline, + ref: 'master', + tag: false, + environment: environment_name, + options: { environment: options }, + project: project) + end + + it 'creates ref' do + expect_any_instance_of(Repository) + .to receive(:create_ref) + .with(deployment.sha, "refs/environments/production/deployments/#{deployment.iid}") + + service.execute + end + end + context 'when start action is defined' do let(:options) { { name: 'production', action: 'start' } } |