mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Support for disclosure settings. Tests
This commit is contained in:
parent
64b0481cb2
commit
4e5aecb26d
7 changed files with 119 additions and 21 deletions
|
@ -18,10 +18,19 @@ describe '.extract_attributes' do
|
|||
|
||||
# TODO: remodel create contact xml to support disclosure
|
||||
it 'should return disclosure has if disclosure' do
|
||||
f = File.open('spec/epp/requests/contacts/create_with_two_addresses.xml')
|
||||
parsed_frame = Nokogiri::XML(f).remove_namespaces!
|
||||
f.close
|
||||
xml = EppXml::Contact.create(
|
||||
{
|
||||
disclose: { value: {
|
||||
voice: { value: '' },
|
||||
addr: { value: '' },
|
||||
name: { value: '' },
|
||||
org_name: { value: '' },
|
||||
email: { value: '' },
|
||||
fax: { value: '' }
|
||||
}, attrs: { flag: '0' }
|
||||
} })
|
||||
parsed_frame = Nokogiri::XML(xml).remove_namespaces!
|
||||
result = ContactDisclosure.extract_attributes(parsed_frame)
|
||||
expect(result).to eq({ phone: '0', email: '0' })
|
||||
expect(result).to eq({ phone: '0', email: '0', fax: '0', address: '0', name: '0', org_name: '0' })
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue