From af46be8d0f258d153dfa49647ffb1d5751cadf35 Mon Sep 17 00:00:00 2001 From: tsoganov Date: Tue, 15 Oct 2024 14:24:02 +0300 Subject: [PATCH] Corrected tests --- test/services/identification_service_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/services/identification_service_test.rb b/test/services/identification_service_test.rb index a11ef7806..ff080d239 100644 --- a/test/services/identification_service_test.rb +++ b/test/services/identification_service_test.rb @@ -25,7 +25,7 @@ class IdentificationServiceTest < ActiveSupport::TestCase headers: { 'Authorization' => 'Bearer mock_token' }, body: request_params.to_json ) - .to_return(status: 201, body: response_body) + .to_return(status: 201, body: response_body, headers: { 'Content-Type' => 'application/json' }) result = @service.create_identification_request(request_params) assert_equal JSON.parse(response_body), result @@ -49,7 +49,7 @@ class IdentificationServiceTest < ActiveSupport::TestCase headers: { 'Authorization' => 'Bearer mock_token' }, body: request_params.to_json ) - .to_return(status: 400, body: { error: 'Bad Request' }.to_json) + .to_return(status: 400, body: { error: 'Bad Request' }.to_json, headers: { 'Content-Type' => 'application/json' }) assert_raises(Eeid::IdentError, 'Bad Request') do @service.create_identification_request(request_params) @@ -65,7 +65,7 @@ class IdentificationServiceTest < ActiveSupport::TestCase stub_request(:get, %r{api/ident/v1/identification_requests/#{id}}) .with(headers: { 'Authorization' => 'Bearer mock_token' }) - .to_return(status: 200, body: response_body) + .to_return(status: 200, body: response_body, headers: { 'Content-Type' => 'application/json' }) result = @service.get_identification_request(id) assert_equal JSON.parse(response_body), result