mirror of
https://github.com/internetee/registry.git
synced 2025-07-19 17:25:57 +02:00
Add a new test for domain info query, epp_errors improvement
This commit is contained in:
parent
5b91acb343
commit
28a6b59a55
7 changed files with 34 additions and 3 deletions
|
@ -234,6 +234,12 @@ describe 'EPP Domain', epp: true do
|
|||
|
||||
expect(inf_data.css('upDate').text).to eq(d.updated_at.to_time.utc.to_s)
|
||||
end
|
||||
|
||||
it 'returns error when domain can not be found' do
|
||||
response = epp_request(domain_info_xml(name_value: 'test.ee'), :xml)
|
||||
expect(response[:results][0][:result_code]).to eq('2303')
|
||||
expect(response[:results][0][:msg]).to eq('Domain not found')
|
||||
end
|
||||
end
|
||||
|
||||
it 'checks a domain' do
|
||||
|
|
|
@ -114,6 +114,9 @@ describe 'EPP Helper', epp: true do
|
|||
<domain:info
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name hosts="all">example.ee</domain:name>
|
||||
<domain:authInfo>
|
||||
<domain:pw>2fooBAR</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:info>
|
||||
</info>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
|
@ -132,6 +135,9 @@ describe 'EPP Helper', epp: true do
|
|||
<domain:info
|
||||
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name hosts="sub">one.ee</domain:name>
|
||||
<domain:authInfo>
|
||||
<domain:pw>b3rafsla</domain:pw>
|
||||
</domain:authInfo>
|
||||
</domain:info>
|
||||
</info>
|
||||
<clTRID>ABC-12345</clTRID>
|
||||
|
@ -140,7 +146,7 @@ describe 'EPP Helper', epp: true do
|
|||
').to_s.squish
|
||||
|
||||
|
||||
generated = Nokogiri::XML(domain_info_xml(name_value: 'one.ee', name_hosts: 'sub')).to_s.squish
|
||||
generated = Nokogiri::XML(domain_info_xml(name_value: 'one.ee', name_hosts: 'sub', pw: 'b3rafsla')).to_s.squish
|
||||
expect(generated).to eq(expected)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue