Skip to content

Commit

Permalink
updating CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmchan committed Sep 19, 2016
1 parent 3e5e884 commit 43f8e8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

* [#1479](https://github.com/ruby-grape/grape/pull/1479): Support inserting middleware before/after anonymous classes in the middleware stack - [@rosa](https://github.com/rosa).
* [#1488](https://github.com/ruby-grape/grape/pull/1488): Ensure calling before filters when receiving OPTIONS request - [@namusyaka](https://github.com/namusyaka), [@jlfaber](https://github.com/jlfaber).
* [#1493](https://github.com/ruby-grape/grape/pull/1493): Coercion and lambda fails params validation - [@jonmchan](https://github.com/jonmchan).

0.17.0 (7/29/2016)
==================
Expand Down
6 changes: 3 additions & 3 deletions spec/grape/validations/params_scope_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def initialize(value)

context 'coercing values validation with proc' do
it 'allows the proc to pass validation without checking' do
subject.params { requires :numbers, type: Integer, values: -> { [0,1,2] } }
subject.params { requires :numbers, type: Integer, values: -> { [0, 1, 2] } }

subject.post('/required') { 'coercion with proc works' }
post '/required', numbers: '1'
Expand All @@ -168,7 +168,7 @@ def initialize(value)
end

it 'allows the proc to pass validation without checking in value' do
subject.params { requires :numbers, type: Integer, values: { value: -> { [0,1,2] } } }
subject.params { requires :numbers, type: Integer, values: { value: -> { [0, 1, 2] } } }

subject.post('/required') { 'coercion with proc works' }
post '/required', numbers: '1'
Expand All @@ -177,7 +177,7 @@ def initialize(value)
end

it 'allows the proc to pass validation without checking in except' do
subject.params { requires :numbers, type: Integer, values: { except: -> { [0,1,2] } } }
subject.params { requires :numbers, type: Integer, values: { except: -> { [0, 1, 2] } } }

subject.post('/required') { 'coercion with proc works' }
post '/required', numbers: '10'
Expand Down
2 changes: 1 addition & 1 deletion spec/grape/validations/validators/values_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def app
it 'allows any other value outside excepts' do
get '/except/exclusive/lambda/coercion', type: '10010000'
expect(last_response.status).to eq 200
expect(last_response.body).to eq({ type: 10010000 }.to_json)
expect(last_response.body).to eq({ type: 10_010_000 }.to_json)
end

it 'rejects values that matches except' do
Expand Down

0 comments on commit 43f8e8c

Please sign in to comment.