We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51e3022 commit 7c8b76eCopy full SHA for 7c8b76e
spec/grape/exceptions/validation_spec.rb
@@ -1,6 +1,10 @@
1
require 'spec_helper'
2
3
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
+
8
it 'store message_key' do
9
expect(Grape::Exceptions::Validation.new(params: ['id'], message_key: 'presence').message_key).to eq('presence')
10
end
0 commit comments