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/serializers/discussion_entity_spec.rb')
-rw-r--r--spec/serializers/discussion_entity_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/serializers/discussion_entity_spec.rb b/spec/serializers/discussion_entity_spec.rb
index 4adf1dc5994..b441fd08b98 100644
--- a/spec/serializers/discussion_entity_spec.rb
+++ b/spec/serializers/discussion_entity_spec.rb
@@ -73,9 +73,19 @@ describe DiscussionEntity do
:diff_file,
:truncated_diff_lines,
:position,
+ :positions,
+ :line_codes,
:line_code,
:active
)
end
+
+ context 'diff_head_compare feature is disabled' do
+ it 'does not expose positions and line_codes attributes' do
+ stub_feature_flags(merge_ref_head_comments: false)
+
+ expect(subject.keys).not_to include(:positions, :line_codes)
+ end
+ end
end
end