Skip to content

Commit 7c8b76e

Browse files
committed
Add missing spec for validation exception
1 parent 51e3022 commit 7c8b76e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/grape/exceptions/validation_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
require 'spec_helper'
22

33
describe Grape::Exceptions::Validation do
4+
it 'fails when params are missing' do
5+
expect { Grape::Exceptions::Validation.new(message_key: 'presence') }.to raise_error(RuntimeError, 'Params are missing:')
6+
end
7+
48
it 'store message_key' do
59
expect(Grape::Exceptions::Validation.new(params: ['id'], message_key: 'presence').message_key).to eq('presence')
610
end

0 commit comments

Comments
 (0)