Merge branch 'master' of github.com:domify/registry

This commit is contained in:
Martin Lensment 2015-09-11 16:57:10 +03:00
commit b865ae7964

View file

@ -1299,7 +1299,7 @@ describe 'EPP Domain', epp: true do
x.registrar_id.should == @registrar2.id
end
new_contact = Contact.last
new_contact = Contact.last(2).sort.last # ensure fixed order
new_contact.name.should == old_contact.name
# there should be 2 references to the new contact
@ -1353,13 +1353,10 @@ describe 'EPP Domain', epp: true do
x.registrar_id.should == @registrar2.id
end
new_contact, new_contact_2 = Contact.last(2)
new_contact, new_contact_2 = Contact.last(2).sort
# database does not follow always same order, thus we swap object when different order
new_contact, new_contact_2 = new_contact_2, new_contact if new_contact.name != 'first'
new_contact.name.should == old_contact.name
new_contact_2.name.should == old_contact_2.name
new_contact.name.should == 'first'
new_contact_2.name.should == 'second'
# there should be 2 references to the new contact (admin + tech)
domain.domain_contacts.where(contact_id: new_contact.id).count.should == 2