mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
WhoisBody refactored to has_one
This commit is contained in:
parent
82fd2db963
commit
db81a9e7bc
6 changed files with 62 additions and 27 deletions
|
@ -34,13 +34,9 @@ describe Domain do
|
|||
@domain.versions.should == []
|
||||
end
|
||||
|
||||
it 'should not have whois_body' do
|
||||
it 'should not have whois body' do
|
||||
@domain.whois_body.should == nil
|
||||
end
|
||||
|
||||
it 'should not have whois json' do
|
||||
@domain.whois_json.should == nil
|
||||
end
|
||||
end
|
||||
|
||||
context 'with valid attributes' do
|
||||
|
@ -82,7 +78,7 @@ describe Domain do
|
|||
end
|
||||
|
||||
it 'should have whois json by default' do
|
||||
@domain.whois_json.present?.should == true
|
||||
@domain.whois_body.whois_json.present?.should == true
|
||||
end
|
||||
|
||||
it 'should have whois_body present by default' do
|
||||
|
@ -113,7 +109,7 @@ describe Domain do
|
|||
@domain.nameservers = [ns1, ns2]
|
||||
|
||||
@domain.update_whois_body
|
||||
@domain.whois_body.should == <<-EOS
|
||||
@domain.whois_body.whois_body.should == <<-EOS
|
||||
Estonia .ee Top Level Domain WHOIS server
|
||||
|
||||
Domain:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue