diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-12 00:16:38 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-12 00:16:38 -0500 |
commit | c80f5e0a1c4906bf01ff02542d3c6b2afc79c5ff (patch) | |
tree | c7e9c6a4f49b2420e0954c80f8704d2741d51a08 /app/models/diff_note.rb | |
parent | 6073b281aa4c9338005a146332d4150b89d424df (diff) | |
download | gitlab-ce-c80f5e0a1c4906bf01ff02542d3c6b2afc79c5ff.tar.gz |
Add specs for new Note and DiffNote methods.
Diffstat (limited to 'app/models/diff_note.rb')
-rw-r--r-- | app/models/diff_note.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index c40752b186b..64c347a3e92 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -107,6 +107,9 @@ class DiffNote < Note return unless resolvable? discussion_notes = self.noteable.notes.fresh.select { |n| n.discussion_id == self.discussion_id } + + return if discussion_notes.empty? + Discussion.new(discussion_notes) end |