summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r--spec/models/note_spec.rb10
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