spec/lib/base_spec.rb in flexirest-1.5.3 vs spec/lib/base_spec.rb in flexirest-1.5.4

- old
+ new

@@ -311,12 +311,12 @@ EmptyExample._request("http://api.example.com/") end it "passes headers" do stub_request(:get, "http://api.example.com/v1"). - with(headers: {'Accept'=>'application/hal+json, application/json;q=0.5', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Connection'=>'Keep-Alive', 'X-Something'=>'foo/bar', 'User-Agent'=>'Flexirest/1.5.2'}). + with(headers: {'Accept'=>'application/hal+json, application/json;q=0.5', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Connection'=>'Keep-Alive', 'Content-Type'=>'application/x-www-form-urlencoded', 'X-Something'=>'foo/bar', 'User-Agent'=>/Flexirest\//}). to_return(status: 200, body: "", headers: {}) - EmptyExample._request("http://api.example.com/v1", :get, {}, {"X-Something": "foo/bar"}) + EmptyExample._request("http://api.example.com/v1", :get, {}, {headers: {"X-Something": "foo/bar"}}) end it "runs callbacks as usual" do expect_any_instance_of(Flexirest::Request).to receive(:do_request).with(any_args).and_return(::FaradayResponseMock.new(OpenStruct.new(status:200, response_headers:{}, body:"{\"first_name\":\"Billy\"}"))) expect(EmptyExample).to receive(:_callback_request).with(any_args).exactly(2).times