Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/committee/rails/test/methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def default_schema
end

def request_object
@request_object ||= Committee::Rails::RequestObject.new(integration_session.request)
Committee::Rails::RequestObject.new(integration_session.request)
end

def response_data
Expand Down
10 changes: 10 additions & 0 deletions spec/lib/methods_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
assert_schema_conform(200)
end

context 'and multiple requests in one example' do
it 'validates each request against its own operation' do
post '/users', params: { nickname: 'willnet' }.to_json, headers: { 'Content-Type' => 'application/json' }
assert_schema_conform(200)

get '/users', params: { page: 1 }, headers: { 'Content-Type' => 'application/json' }
assert_schema_conform(200)
end
end

context 'and request with querystring' do
it 'pass' do
get '/users', params: { page: 1 }, headers: { 'Content-Type' => 'application/json' }
Expand Down
Loading