diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/models/note_spec.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) | |
download | gitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r-- | spec/models/note_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 992b2246f01..4eabc266b40 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -1384,6 +1384,16 @@ RSpec.describe Note do expect(notes.second.id).to eq(note2.id) end end + + describe '.with_suggestions' do + it 'returns the correct note' do + note_with_suggestion = create(:note, suggestions: [create(:suggestion)]) + note_without_suggestion = create(:note) + + expect(described_class.with_suggestions).to include(note_with_suggestion) + expect(described_class.with_suggestions).not_to include(note_without_suggestion) + end + end end describe '#noteable_assignee_or_author?' do |