Closed
Description
Background
Testing for missing values on a PUT request, it would be nice to have the following supported via extra_params
with a example_request
.
put '/users' do
parameter :first_name, 'Users first name', scope: :user
parameter :last_name, 'Users last name', scope: :user
example_request 'with attributes', user: { first_name: 'John' } do
status.should == 200
end
example_request 'without set attributes' do
status.should == 422
end
end
Currently this function is not "additive" but instead it overrides the entire user
key with a new value. I am not sure if you want to use a different DSL for doing this sort of operation (like allowing some form of lets inside example_request blocks or a different syntax for specifying additive versus overwriting parameters).
Let me know what approach you'd like, as I am eager to contribute back to this awesome project!
Metadata
Metadata
Assignees
Labels
No labels