From 9ecea3edc5becde4c1873c21dfc0f9f235a89280 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Fri, 14 Jun 2024 11:18:55 +0100 Subject: [PATCH] fix deprecation warnings --- spec/lib/hmrc/client_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/hmrc/client_spec.rb b/spec/lib/hmrc/client_spec.rb index 9e2f307c1a..b172e94e68 100644 --- a/spec/lib/hmrc/client_spec.rb +++ b/spec/lib/hmrc/client_spec.rb @@ -10,7 +10,7 @@ let(:token_expiry) { 99999 } before do - http_client.stub(:post).with("#{base_url}/oauth/token", headers: nil, body: { + allow(http_client).to receive(:post).with("#{base_url}/oauth/token", headers: nil, body: { grant_type: "client_credentials", client_id: client_id, client_secret: client_secret @@ -87,7 +87,7 @@ end before do - http_client.stub(:post).with("#{base_url}/misc/bank-account/verify/personal", headers: expected_headers, body: expected_payload) do + allow(http_client).to receive(:post).with("#{base_url}/misc/bank-account/verify/personal", headers: expected_headers, body: expected_payload) do double(body: response_to_return, success?: response_success, code: response_code) end end