mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Add tests
This commit is contained in:
parent
f47182f1bf
commit
70aba7d5d1
1 changed files with 2 additions and 1 deletions
|
@ -61,7 +61,7 @@ describe Nameserver do
|
|||
Fabricate(:nameserver, hostname: 'ns3.test.ee')
|
||||
], registrar: @api_user.registrar)
|
||||
|
||||
Fabricate(:domain, nameservers: [
|
||||
@domain_3 = Fabricate(:domain, nameservers: [
|
||||
Fabricate(:nameserver, hostname: 'ns1.ns.ee'),
|
||||
Fabricate(:nameserver, hostname: 'ns2.ns.ee'),
|
||||
Fabricate(:nameserver, hostname: 'ns3.test.ee')
|
||||
|
@ -89,6 +89,7 @@ describe Nameserver do
|
|||
@api_user.registrar.nameservers.where("hostname LIKE '%test.ee'").count.should == 2
|
||||
@domain_1.nameservers.pluck(:hostname).should include('ns1.test.ee', 'ns2.test.ee', 'ns2.testing.ee')
|
||||
@domain_2.nameservers.pluck(:hostname).should include('ns1.testing.ee', 'ns2.testing.ee', 'ns3.testing.ee')
|
||||
@domain_3.nameservers.pluck(:hostname).should include('ns1.ns.ee', 'ns2.ns.ee', 'ns3.test.ee')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue