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/lib/gitlab/data_builder/deployment_spec.rb')
-rw-r--r--spec/lib/gitlab/data_builder/deployment_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/data_builder/deployment_spec.rb b/spec/lib/gitlab/data_builder/deployment_spec.rb
index bbcfa1973ea..bf97f40e97f 100644
--- a/spec/lib/gitlab/data_builder/deployment_spec.rb
+++ b/spec/lib/gitlab/data_builder/deployment_spec.rb
@@ -50,6 +50,15 @@ RSpec.describe Gitlab::DataBuilder::Deployment, feature_category: :continuous_de
expect(data[:deployable_url]).to be_nil
end
+ it 'does not include the deployable URL when deployable is bridge' do
+ project = create(:project, :repository)
+ bridge = create(:ci_bridge, project: project)
+ deployment = create(:deployment, status: :failed, project: project, deployable: bridge)
+ data = described_class.build(deployment, 'failed', Time.current)
+
+ expect(data[:deployable_url]).to be_nil
+ end
+
context 'when commit does not exist in the repository' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:deployment) { create(:deployment, project: project) }