summaryrefslogtreecommitdiff
path: root/spec/presenters/ci/pipeline_presenter_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 09:08:55 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-30 09:08:55 +0000
commitbe37a0ee5e3e3dbb967266248f0f46f14a9931e2 (patch)
tree8fd575a36933fb847a6f92ff76d9c1ad908a3f7b /spec/presenters/ci/pipeline_presenter_spec.rb
parent6305f1dc00870f6e0635e2e850538a00bbd00bda (diff)
downloadgitlab-ce-be37a0ee5e3e3dbb967266248f0f46f14a9931e2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/presenters/ci/pipeline_presenter_spec.rb')
-rw-r--r--spec/presenters/ci/pipeline_presenter_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/presenters/ci/pipeline_presenter_spec.rb b/spec/presenters/ci/pipeline_presenter_spec.rb
index fd391478eb4..700d1f5cbb6 100644
--- a/spec/presenters/ci/pipeline_presenter_spec.rb
+++ b/spec/presenters/ci/pipeline_presenter_spec.rb
@@ -209,6 +209,15 @@ describe Ci::PipelinePresenter do
"<a class=\"mr-iid\" href=\"#{merge_request_path(mr_2)}\">#{mr_2.to_reference} #{mr_2.title}</a>, " \
"<a class=\"mr-iid\" href=\"#{merge_request_path(mr_1)}\">#{mr_1.to_reference} #{mr_1.title}</a>")
}
+
+ context 'with a limit passed' do
+ subject { presenter.all_related_merge_request_text(limit: 1) }
+
+ it {
+ is_expected.to eq("2 related merge requests: " \
+ "<a class=\"mr-iid\" href=\"#{merge_request_path(mr_2)}\">#{mr_2.to_reference} #{mr_2.title}</a>")
+ }
+ end
end
end