diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 09:08:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 09:08:11 +0000 |
commit | 5064bf8c5647d4c4430cbb4d097cf1592416de29 (patch) | |
tree | d051bf2abe2cc7061b3a7facb6669a56ccb9cf54 /spec/models/concerns | |
parent | 9c83aadd2604e7e6cb1f84683f951e6b12872618 (diff) | |
download | gitlab-ce-5064bf8c5647d4c4430cbb4d097cf1592416de29.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/noteable_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/concerns/noteable_spec.rb b/spec/models/concerns/noteable_spec.rb index e8991a3a015..097bc24d90f 100644 --- a/spec/models/concerns/noteable_spec.rb +++ b/spec/models/concerns/noteable_spec.rb @@ -62,6 +62,21 @@ describe Noteable do end end + describe '#discussion_ids_relation' do + it 'returns ordered discussion_ids' do + discussion_ids = subject.discussion_ids_relation.pluck(:discussion_id) + + expect(discussion_ids).to eq([ + active_diff_note1, + active_diff_note3, + outdated_diff_note1, + discussion_note1, + note1, + note2 + ].map(&:discussion_id)) + end + end + describe '#grouped_diff_discussions' do let(:grouped_diff_discussions) { subject.grouped_diff_discussions } |