Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/finders/notes_finder_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/finders/notes_finder_spec.rb b/spec/finders/notes_finder_spec.rb
index 3b28070ffaa..27eaba8dfa1 100644
--- a/spec/finders/notes_finder_spec.rb
+++ b/spec/finders/notes_finder_spec.rb
@@ -22,5 +22,10 @@ describe NotesFinder do
notes = NotesFinder.new.execute(project, user, params)
notes.size.should eq(2)
end
+
+ it 'should raise an exception for an invalid target_type' do
+ params = { target_id: commit.id, target_type: 'invalid' }
+ expect { NotesFinder.new.execute(project, user, params) }.to raise_error('invalid target_type')
+ end
end
end