mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Fix #1000
* Return contacts inside domain object * Return registrant uuid and name inside domain object
This commit is contained in:
parent
b6cc22dbfc
commit
f551140a0d
6 changed files with 484 additions and 255 deletions
|
@ -30,6 +30,11 @@ class RegistrantApiDomainsTest < ApplicationIntegrationTest
|
|||
|
||||
assert_equal('hospital.test', domain[:name])
|
||||
assert_equal('5edda1a5-3548-41ee-8b65-6d60daf85a37', domain[:id])
|
||||
assert_equal({name: 'John', id: 'eb2f2766-b44c-4e14-9f16-32ab1a7cb957'}, domain[:registrant])
|
||||
assert_equal([{name: 'John', id: 'eb2f2766-b44c-4e14-9f16-32ab1a7cb957'}],
|
||||
domain[:admin_contacts])
|
||||
assert_equal([{name: 'John', id: 'eb2f2766-b44c-4e14-9f16-32ab1a7cb957'}],
|
||||
domain[:tech_contacts])
|
||||
assert_equal({ name: 'Good Names', website: nil }, domain[:registrar])
|
||||
assert_equal([], domain[:nameservers])
|
||||
assert(domain.has_key?(:locked_by_registrant_at))
|
||||
|
|
|
@ -130,6 +130,11 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest
|
|||
response_json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_equal({ name: 'Best Names', website: 'bestnames.test' }, response_json[:registrar])
|
||||
assert_equal({name: 'John', id: 'eb2f2766-b44c-4e14-9f16-32ab1a7cb957'}, response_json[:registrant])
|
||||
assert_equal([{name: 'Jane', id: '9db3de62-2414-4487-bee2-d5c155567768'}], response_json[:admin_contacts])
|
||||
assert_equal([{name: 'William', id: '0aa54704-d6f7-4ca9-b8ca-2827d9a4e4eb'},
|
||||
{name: 'Acme Ltd', id: 'f1dd365c-5be9-4b3d-a44e-3fa002465e4d'}],
|
||||
response_json[:tech_contacts])
|
||||
assert_equal(
|
||||
[{hostname: 'ns1.bestnames.test', ipv4: ['192.0.2.1'], ipv6: ['2001:db8::1']},
|
||||
{hostname: 'ns2.bestnames.test', ipv4: ['192.0.2.2'], ipv6: ['2001:db8::2']}].to_set,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue