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
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-04-28 13:53:37 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-04-28 13:55:13 +0400
commit7339464e7701c0778cca12c12ace83ebd8ffe2f7 (patch)
tree64bda947686ba7b621c85dee0301b17da8e83f6e /spec/finders
parente5cf5f4f98464543ec2f06415e071b8110368cc7 (diff)
Fail faster on an invalid target_type
Diffstat (limited to 'spec/finders')
-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