mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Update domains controller to return serialized domains now
This commit is contained in:
parent
ed0316dd83
commit
ce8451d004
3 changed files with 73 additions and 33 deletions
|
@ -27,7 +27,12 @@ class RegistrantApiDomainsTest < ApplicationIntegrationTest
|
|||
assert_equal(200, response.status)
|
||||
|
||||
domain = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_equal('hospital.test', domain[:name])
|
||||
assert_equal('5edda1a5-3548-41ee-8b65-6d60daf85a37', domain[:id])
|
||||
assert_equal('Good Names', domain[:registrar])
|
||||
assert_equal([], domain[:nameservers])
|
||||
assert(domain.has_key?(:locked_by_registrant_at))
|
||||
end
|
||||
|
||||
def test_get_non_existent_domain_details_by_uuid
|
||||
|
@ -45,6 +50,9 @@ class RegistrantApiDomainsTest < ApplicationIntegrationTest
|
|||
response_json = JSON.parse(response.body, symbolize_names: true)
|
||||
array_of_domain_names = response_json.map { |x| x[:name] }
|
||||
assert(array_of_domain_names.include?('hospital.test'))
|
||||
|
||||
array_of_domain_registrars = response_json.map { |x| x[:registrar] }
|
||||
assert(array_of_domain_registrars.include?('Good Names'))
|
||||
end
|
||||
|
||||
def test_root_accepts_limit_and_offset_parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue