Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/deployments/update_environment_service_spec.rb')
-rw-r--r--spec/services/deployments/update_environment_service_spec.rb21
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' } }