mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Validate domain create elements with nesting
This commit is contained in:
parent
3b4bebaf2d
commit
bc80274109
2 changed files with 3 additions and 3 deletions
|
@ -126,7 +126,7 @@ class Epp::DomainsController < EppController
|
||||||
|
|
||||||
def validate_create
|
def validate_create
|
||||||
# TODO: Verify contact presence if registrant is juridical
|
# TODO: Verify contact presence if registrant is juridical
|
||||||
ret = epp_request_valid?('name', 'ns', 'registrant', 'legalDocument', 'hostAttr')
|
ret = epp_request_valid?('name', 'ns', 'registrant', 'extension > extdata > legalDocument', 'ns > hostAttr')
|
||||||
|
|
||||||
if params[:parsed_frame].css('dsData').count > 0 && params[:parsed_frame].css('create > keyData').count > 0
|
if params[:parsed_frame].css('dsData').count > 0 && params[:parsed_frame].css('create > keyData').count > 0
|
||||||
epp_errors << { code: '2306', msg: I18n.t('ds_data_and_key_data_must_not_exists_together') }
|
epp_errors << { code: '2306', msg: I18n.t('ds_data_and_key_data_must_not_exists_together') }
|
||||||
|
|
|
@ -80,7 +80,7 @@ describe 'EPP Domain', epp: true do
|
||||||
expect(response[:results][1][:msg]).to eq('Required parameter missing: registrant')
|
expect(response[:results][1][:msg]).to eq('Required parameter missing: registrant')
|
||||||
|
|
||||||
expect(response[:results][2][:result_code]).to eq('2003')
|
expect(response[:results][2][:result_code]).to eq('2003')
|
||||||
expect(response[:results][2][:msg]).to eq('Required parameter missing: legalDocument')
|
expect(response[:results][2][:msg]).to eq('Required parameter missing: extension > extdata > legalDocument')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with two epp users' do
|
context 'with two epp users' do
|
||||||
|
@ -520,7 +520,7 @@ describe 'EPP Domain', epp: true do
|
||||||
|
|
||||||
response = epp_request(xml, :xml)
|
response = epp_request(xml, :xml)
|
||||||
expect(response[:result_code]).to eq('2003')
|
expect(response[:result_code]).to eq('2003')
|
||||||
expect(response[:msg]).to eq('Required parameter missing: hostAttr')
|
expect(response[:msg]).to eq('Required parameter missing: ns > hostAttr')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates domain with nameservers with ips' do
|
it 'creates domain with nameservers with ips' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue