mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Add owner contact
This commit is contained in:
parent
292daa66e0
commit
7a9988236e
2 changed files with 4 additions and 1 deletions
|
@ -29,7 +29,8 @@ module Epp::DomainsHelper
|
||||||
period: ph[:period].to_i,
|
period: ph[:period].to_i,
|
||||||
valid_from: Date.today,
|
valid_from: Date.today,
|
||||||
valid_to: Date.today + ph[:period].to_i.years,
|
valid_to: Date.today + ph[:period].to_i.years,
|
||||||
auth_info: ph[:authInfo][:pw]
|
auth_info: ph[:authInfo][:pw],
|
||||||
|
owner_contact_id: Contact.find_by(code: ph[:registrant]).try(:id)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ describe 'EPP Domain', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates a domain with contacts' do
|
it 'creates a domain with contacts' do
|
||||||
|
Fabricate(:contact, code: 'jd1234')
|
||||||
Fabricate(:contact, code: 'sh8013')
|
Fabricate(:contact, code: 'sh8013')
|
||||||
Fabricate(:contact, code: 'sh801333')
|
Fabricate(:contact, code: 'sh801333')
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ describe 'EPP Domain', epp: true do
|
||||||
|
|
||||||
expect(Domain.first.tech_contacts.count).to eq 2
|
expect(Domain.first.tech_contacts.count).to eq 2
|
||||||
expect(Domain.first.admin_contacts.count).to eq 1
|
expect(Domain.first.admin_contacts.count).to eq 1
|
||||||
|
expect(Domain.first.owner_contact).to_not be nil
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'checks a domain' do
|
it 'checks a domain' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue