summaryrefslogtreecommitdiff
path: root/spec/finders/notes_finder_spec.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-04-28 11:53:37 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-04-28 11:55:13 +0200
commit7339464e7701c0778cca12c12ace83ebd8ffe2f7 (patch)
tree64bda947686ba7b621c85dee0301b17da8e83f6e /spec/finders/notes_finder_spec.rb
parente5cf5f4f98464543ec2f06415e071b8110368cc7 (diff)
downloadgitlab-ce-7339464e7701c0778cca12c12ace83ebd8ffe2f7.tar.gz
Fail faster on an invalid target_type
Diffstat (limited to 'spec/finders/notes_finder_spec.rb')
-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