diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-04-27 13:41:26 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-05-02 14:07:53 +0300 |
commit | 8c3a03c1b9bf5c80571c9dc07ba258fa10dd61c8 (patch) | |
tree | a83db3e692f01ad711f1693c739f43f6cca400ca /spec/finders/notes_finder_spec.rb | |
parent | 8100f9686dcd729f42d14e86cb9b36b403e036ac (diff) |
Display comments for personal snippets
Diffstat (limited to 'spec/finders/notes_finder_spec.rb')
-rw-r--r-- | spec/finders/notes_finder_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/finders/notes_finder_spec.rb b/spec/finders/notes_finder_spec.rb index 765bf44d863..ba6bbb3bce0 100644 --- a/spec/finders/notes_finder_spec.rb +++ b/spec/finders/notes_finder_spec.rb @@ -110,6 +110,15 @@ describe NotesFinder do expect(notes.count).to eq(1) end + it 'finds notes on personal snippets' do + note = create(:note_on_personal_snippet) + params = { target_type: 'personal_snippet', target_id: note.noteable_id } + + notes = described_class.new(project, user, params).execute + + expect(notes.count).to eq(1) + end + it 'raises an exception for an invalid target_type' do params[:target_type] = 'invalid' expect { described_class.new(project, user, params).execute }.to raise_error('invalid target_type') |