mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Refactor domain create xmls to builders
This commit is contained in:
parent
e5ac9f32f6
commit
952b379aaf
4 changed files with 67 additions and 63 deletions
|
@ -323,7 +323,6 @@ describe 'EPP Domain', epp: true do
|
|||
{ hostObj: { value: 'invalid1-' } },
|
||||
{ hostObj: { value: '-invalid2' } }
|
||||
]
|
||||
|
||||
})
|
||||
|
||||
response = epp_request(xml, :xml)
|
||||
|
@ -332,7 +331,7 @@ describe 'EPP Domain', epp: true do
|
|||
end
|
||||
|
||||
it 'creates domain with nameservers with ips' do
|
||||
epp_request('domains/create_w_host_attrs.xml')
|
||||
epp_request(domain_create_with_host_attrs, :xml)
|
||||
expect(Domain.first.nameservers.count).to eq(2)
|
||||
ns = Domain.first.nameservers.first
|
||||
expect(ns.ipv4).to eq('192.0.2.2')
|
||||
|
@ -340,7 +339,7 @@ describe 'EPP Domain', epp: true do
|
|||
end
|
||||
|
||||
it 'returns error when nameserver has invalid ips' do
|
||||
response = epp_request('domains/create_w_invalid_ns_ip.xml')
|
||||
response = epp_request(domain_create_with_invalid_ns_ip_xml, :xml)
|
||||
expect(response[:results][0][:result_code]).to eq '2005'
|
||||
expect(response[:results][0][:msg]).to eq 'IPv4 is invalid'
|
||||
expect(response[:results][0][:value]).to eq '192.0.2.2.invalid'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue