1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00

latest webmock (v1.20.4) requires explicit argument

ref 5554c0d87b
This commit is contained in:
nov 2014-11-14 01:11:12 +09:00
parent 32039cc401
commit 71dde01f86

View file

@ -54,13 +54,12 @@ module MockGraph
authorization: "Bearer #{options[:access_token]}"
}
end
if options[:params]
case method
when :post, :put, :delete
request[:body] = options[:params]
else
request[:query] = options[:params]
end
params = options.try(:[], :params) || {}
case method
when :post, :put, :delete
request[:body] = params
else
request[:query] = params
end
request
end