spec/lib/myfinance/resources/attachment_spec.rb in myfinance-1.6.3 vs spec/lib/myfinance/resources/attachment_spec.rb in myfinance-1.6.4

- old
+ new

@@ -87,11 +87,11 @@ it "raises Myfinance::RequestError" do expect { subject }.to raise_error(Myfinance::RequestError) end it "adds information on request error object" do - expect(Myfinance::RequestError).to receive(:new).with(code: 422, message: "Unprocessable Entity", body: { "attachment" => ["não pode ser vazio."] }).and_call_original + expect(Myfinance::RequestError).to receive(:new).with(code: 422, message: "Unprocessable Entity", body: { "attachment" => ["não pode ser vazio."] }, headers: instance_of(Typhoeus::Response::Header)).and_call_original expect { subject }.to raise_error(Myfinance::RequestError) end end context "when entity does not exist" do @@ -100,10 +100,10 @@ it "raises Myfinance::RequestError" do expect { subject }.to raise_error(Myfinance::RequestError) end it "adds information on request error object" do - expect(Myfinance::RequestError).to receive(:new).with(code: 403, message: "Forbidden", body: {"error" => "Você não tem permissão para acessar este recurso." }).and_call_original + expect(Myfinance::RequestError).to receive(:new).with(code: 403, message: "Forbidden", body: {"error" => "Você não tem permissão para acessar este recurso." }, headers: instance_of(Typhoeus::Response::Header)).and_call_original expect { subject }.to raise_error(Myfinance::RequestError) end end end