mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Make whois JSON test order independent
The test relied on nameservers being inserted in specific order. For whatever reason, that order can change, but it does not make the record invalid. [ns1.google.com, ns2.google.com] is semantically equal to [ns2.google.com, ns1.google.com]
This commit is contained in:
parent
39fe8ef6ce
commit
f0473825e4
1 changed files with 4 additions and 1 deletions
|
@ -22,7 +22,6 @@ class WhoisRecordTest < ActiveSupport::TestCase
|
|||
registrant_kind: 'priv',
|
||||
email: 'john@inbox.test',
|
||||
expire: '2010-07-05',
|
||||
nameservers: ['ns1.bestnames.test', 'ns2.bestnames.test'],
|
||||
registrar_address: 'Main Street, New York, New York, 12345',
|
||||
dnssec_keys: [],
|
||||
}
|
||||
|
@ -30,6 +29,10 @@ class WhoisRecordTest < ActiveSupport::TestCase
|
|||
expected_partial_hash.each do |key, value|
|
||||
assert_equal(value, @record.generated_json[key])
|
||||
end
|
||||
|
||||
['ns1.bestnames.test', 'ns2.bestnames.test'].each do |item|
|
||||
assert(@record.generated_json[:nameservers].include?(item))
|
||||
end
|
||||
end
|
||||
|
||||
def test_generated_body_has_justified_disclaimer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue