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
path: root/spec
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2019-06-21 03:10:49 +0300
committerGitLab Release Tools Bot <delivery-team+release-tools@gitlab.com>2019-06-25 19:24:44 +0300
commit119c8d648e6a622dc05ccfa0cebe4cf093092937 (patch)
tree036e896698854ce00b422427a2881ada41335fc1 /spec
parent46c74227b6eb4646560944d7711fa071b9150f22 (diff)
Merge branch 'sh-omit-issues-links-on-poll' into 'master'
Omit issues links in merge request entity API response Closes #63546 See merge request gitlab-org/gitlab-ce!29917 (cherry picked from commit f47e4d025247509ab73e16c3db248b0f9ccb662c) 1b7ab11f Omit issues links in merge request entity API response
Diffstat (limited to 'spec')
-rw-r--r--spec/serializers/merge_request_widget_entity_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/serializers/merge_request_widget_entity_spec.rb b/spec/serializers/merge_request_widget_entity_spec.rb
index a27c22191f4..ffbfac9b326 100644
--- a/spec/serializers/merge_request_widget_entity_spec.rb
+++ b/spec/serializers/merge_request_widget_entity_spec.rb
@@ -32,6 +32,19 @@ describe MergeRequestWidgetEntity do
end
end
+ describe 'issues links' do
+ it 'includes issues links when requested' do
+ data = described_class.new(resource, request: request, issues_links: true).as_json
+
+ expect(data).to include(:issues_links)
+ expect(data[:issues_links]).to include(:assign_to_closing, :closing, :mentioned_but_not_closing)
+ end
+
+ it 'omits issue links by default' do
+ expect(subject).not_to include(:issues_links)
+ end
+ end
+
describe 'pipeline' do
let(:pipeline) { create(:ci_empty_pipeline, project: project, ref: resource.source_branch, sha: resource.source_branch_sha, head_pipeline_of: resource) }