mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Fix company contacts stub
This commit is contained in:
parent
3b46367dbc
commit
f58659041d
1 changed files with 0 additions and 21 deletions
|
@ -34,18 +34,6 @@ class RegistrantApiCompaniesTest < ApplicationIntegrationTest
|
|||
assert_equal(:companies, response_json.keys.first)
|
||||
end
|
||||
|
||||
def test_status_if_nil_result
|
||||
contacts(:john).update!(ident: '12344321', ident_type: 'priv', ident_country_code: 'US')
|
||||
|
||||
CompanyRegister.const_set(:Client, CompanyRegisterClientZeroStub)
|
||||
|
||||
get '/api/v1/registrant/companies', headers: @auth_headers
|
||||
response_json = JSON.parse(response.body, symbolize_names: true)
|
||||
assert_equal(1, response_json.count)
|
||||
assert_equal(200, response.status)
|
||||
assert_equal(:companies, response_json.keys.first)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def auth_token
|
||||
|
@ -54,12 +42,3 @@ class RegistrantApiCompaniesTest < ApplicationIntegrationTest
|
|||
"Bearer #{hash[:access_token]}"
|
||||
end
|
||||
end
|
||||
|
||||
class CompanyRegisterClientZeroStub
|
||||
Company = Struct.new(:registration_number, :company_name)
|
||||
|
||||
def representation_rights(citizen_personal_code:, citizen_country_code:)
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue