summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/ci
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 15:06:16 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 15:06:16 +0000
commit8320f7956d72986f5a7c850874fce4f8b5a8e015 (patch)
treec761b309cfff422609d47a17ac4d6a732c142f49 /spec/support/shared_examples/ci
parent45482d5a2704da7fabe4ccf07f85d9be6e0a791a (diff)
downloadgitlab-ce-8320f7956d72986f5a7c850874fce4f8b5a8e015.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/ci')
-rw-r--r--spec/support/shared_examples/ci/pipeline_email_examples.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/support/shared_examples/ci/pipeline_email_examples.rb b/spec/support/shared_examples/ci/pipeline_email_examples.rb
new file mode 100644
index 00000000000..f72d8af3c65
--- /dev/null
+++ b/spec/support/shared_examples/ci/pipeline_email_examples.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+shared_examples_for 'correct pipeline information for pipelines for merge requests' do
+ context 'when pipeline for merge request' do
+ let(:pipeline) { merge_request.all_pipelines.first }
+
+ let(:merge_request) do
+ create(:merge_request, :with_detached_merge_request_pipeline,
+ source_project: project,
+ target_project: project)
+ end
+
+ it 'renders a source ref of the pipeline' do
+ render
+
+ expect(rendered).to have_content pipeline.source_ref
+ expect(rendered).not_to have_content pipeline.ref
+ end
+ end
+end