lib/pipekit/webmock/api.rb in pipekit-webmock-0.3.0 vs lib/pipekit/webmock/api.rb in pipekit-webmock-0.4.0
- old
+ new
@@ -52,15 +52,15 @@
def stub_create_request(params)
stub_request(:post, resource_uri).with(body: body_from(params))
end
def stub_update_request(params)
- id = params.delete(:id)
+ id = params.delete(:id) || params.delete("id")
stub_request(:put, resource_uri(id)).with(body: body_from(params))
end
def stub_get_request(params)
- id = params.delete(:id)
+ id = params.delete(:id) || params.delete("id")
uri = "#{resource_uri(id)}&#{body_from(params)}&#{body_from(pagination_params)}"
stub_request(:get, uri)
end
def stub_search_request(params)