mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
Corrected tests
This commit is contained in:
parent
0085f99e02
commit
af46be8d0f
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue