spec/lib/proxy_spec.rb in flexirest-1.3.1 vs spec/lib/proxy_spec.rb in flexirest-1.3.2
- old
+ new
@@ -111,10 +111,10 @@
expect_any_instance_of(Flexirest::Connection).to receive(:put).with("/update", "MY-BODY-CONTENT", instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:"{\"result\":true}", status:200, response_headers:{})))
ProxyClientExample.update(fname:"John", lname:"Smith")
end
it "handles DELETE requests" do
- expect_any_instance_of(Flexirest::Connection).to receive(:delete).with("/remove", instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:"{\"result\":true}", status:200, response_headers:{})))
+ expect_any_instance_of(Flexirest::Connection).to receive(:delete).with("/remove", "", instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:"{\"result\":true}", status:200, response_headers:{})))
ProxyClientExample.remove
end
it "can return fake JSON data and have this parsed in the normal way" do
expect_any_instance_of(Flexirest::Connection).not_to receive(:get).with("/fake", instance_of(Hash))