fix domain default contact issue

This commit is contained in:
Priit Tark 2015-05-11 14:10:12 +03:00
parent 6d251f9533
commit e20de5b793
2 changed files with 4 additions and 4 deletions

View file

@ -72,8 +72,8 @@ class Epp::Domain < Domain
def attach_default_contacts def attach_default_contacts
return if registrant.blank? return if registrant.blank?
tech_contacts << registrant if tech_contacts.blank? tech_contacts << registrant if tech_domain_contacts.blank?
admin_contacts << registrant if admin_contacts.blank? && registrant.priv? admin_contacts << registrant if admin_domain_contacts.blank? && registrant.priv?
end end
# rubocop: disable Metrics/PerceivedComplexity # rubocop: disable Metrics/PerceivedComplexity

View file

@ -94,8 +94,8 @@ describe 'EPP Domain', epp: true do
response[:clTRID].should == 'ABC-12345' response[:clTRID].should == 'ABC-12345'
d.registrar.name.should == 'registrar1' d.registrar.name.should == 'registrar1'
d.tech_contacts.count.should == 3 d.tech_contacts.count.should == 2
d.admin_contacts.count.should == 2 d.admin_contacts.count.should == 1
d.nameservers.count.should == 2 d.nameservers.count.should == 2
d.auth_info.should_not be_empty d.auth_info.should_not be_empty