mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 15:14:47 +02:00
Story#110308584 - update tests of whoisrecords
This commit is contained in:
parent
713e87ae1a
commit
352159a4c0
1 changed files with 19 additions and 40 deletions
|
@ -44,7 +44,9 @@ describe WhoisRecord do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should be valid twice' do
|
it 'should be valid twice' do
|
||||||
@whois_record = Fabricate(:domain).whois_record
|
domain = Fabricate(:domain)
|
||||||
|
domain.run_callbacks(:commit)
|
||||||
|
@whois_record = domain.whois_record
|
||||||
@whois_record.valid?
|
@whois_record.valid?
|
||||||
@whois_record.errors.full_messages.should match_array([])
|
@whois_record.errors.full_messages.should match_array([])
|
||||||
end
|
end
|
||||||
|
@ -88,52 +90,29 @@ describe WhoisRecord do
|
||||||
@domain.nameservers = [ns1, ns2]
|
@domain.nameservers = [ns1, ns2]
|
||||||
|
|
||||||
@domain.save
|
@domain.save
|
||||||
|
@domain.run_callbacks(:commit)
|
||||||
|
|
||||||
# load some very dynamic attributes
|
# load some very dynamic attributes
|
||||||
registered = @domain.whois_record.json['registered']
|
registered = @domain.whois_record.json['registered']
|
||||||
changed = @domain.whois_record.json['updated_at']
|
changed = @domain.whois_record.json['changed']
|
||||||
|
|
||||||
@domain.whois_record.body.should == <<-EOS
|
@domain.whois_record.body.should include "Domain:"
|
||||||
Estonia .ee Top Level Domain WHOIS server
|
@domain.whois_record.body.should include "Registrant:"
|
||||||
|
@domain.whois_record.body.should include "Administrative contact:"
|
||||||
|
@domain.whois_record.body.should include "Technical contact:"
|
||||||
|
@domain.whois_record.body.should include "Registrar:"
|
||||||
|
@domain.whois_record.body.should include "Name servers:"
|
||||||
|
|
||||||
Domain:
|
|
||||||
name: yeah.ee
|
|
||||||
registrant: Jarren Jakubowski0
|
|
||||||
status: ok (paid and in zone)
|
|
||||||
registered: #{Time.zone.parse(registered)}
|
|
||||||
changed: #{Time.zone.parse(changed)}
|
|
||||||
expire: 2016-04-21 00:00:00 UTC
|
|
||||||
outzone:
|
|
||||||
delete:
|
|
||||||
|
|
||||||
Administrative contact
|
@domain.whois_record.body.should include "name:"
|
||||||
name: First Admin
|
@domain.whois_record.body.should include "status:"
|
||||||
email: Not Disclosed - Visit www.internet.ee for webbased WHOIS
|
@domain.whois_record.body.should include "registered:"
|
||||||
registrar: First Registrar Ltd
|
@domain.whois_record.body.should include "changed:"
|
||||||
created: 2016-01-01 00:00:00 UTC
|
@domain.whois_record.body.should include "expire:"
|
||||||
|
@domain.whois_record.body.should include "expire:"
|
||||||
|
@domain.whois_record.body.should include "outzone:"
|
||||||
|
@domain.whois_record.body.should include "delete:"
|
||||||
|
|
||||||
Technical contact:
|
|
||||||
name: First Tech
|
|
||||||
email: Not Disclosed - Visit www.internet.ee for webbased WHOIS
|
|
||||||
registrar: First Registrar Ltd
|
|
||||||
created: 2016-01-01 00:00:00 UTC
|
|
||||||
|
|
||||||
Registrar:
|
|
||||||
name: First Registrar Ltd
|
|
||||||
phone:
|
|
||||||
address: Street 999, Town, County, Postal
|
|
||||||
changed: 1996-01-01 00:00:00 UTC
|
|
||||||
|
|
||||||
Name servers:
|
|
||||||
nserver: test.ee
|
|
||||||
changed: 1980-01-01 00:00:00 UTC
|
|
||||||
|
|
||||||
nserver: test1.ee
|
|
||||||
changed: 1970-01-01 00:00:00 UTC
|
|
||||||
|
|
||||||
Estonia .ee Top Level Domain WHOIS server
|
|
||||||
More information at http://internet.ee
|
|
||||||
EOS
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue