mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Refactor #2660
This commit is contained in:
parent
612ea13957
commit
ec6ce7702f
1 changed files with 5 additions and 6 deletions
|
@ -466,21 +466,20 @@ describe 'EPP Contact', epp: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return error when add attributes phone value is empty' do
|
it 'should return error when add attributes phone value is empty' do
|
||||||
|
phone = Contact.find_by(code: 'FIRST0:SH8013').phone
|
||||||
xml = @epp_xml.update({
|
xml = @epp_xml.update({
|
||||||
id: { value: 'FIRST0:SH8013' },
|
id: { value: 'FIRST0:SH8013' },
|
||||||
authInfo: { pw: { value: 'password' } },
|
|
||||||
add: {
|
|
||||||
voice: { value: '' }
|
|
||||||
},
|
|
||||||
chg: {
|
chg: {
|
||||||
postalInfo: { email: { value: 'example@example.ee' } }
|
voice: { value: '' },
|
||||||
|
email: { value: 'example@example.ee' },
|
||||||
|
authInfo: { pw: { value: 'password' } }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
response = epp_plain_request(xml, :xml)
|
response = epp_plain_request(xml, :xml)
|
||||||
response[:results][0][:msg].should == 'Required parameter missing - phone [phone]'
|
response[:results][0][:msg].should == 'Required parameter missing - phone [phone]'
|
||||||
response[:results][0][:result_code].should == '2003'
|
response[:results][0][:result_code].should == '2003'
|
||||||
Contact.find_by(code: 'FIRST0:SH8013').phone.should == '+372.7654321' # aka not changed
|
Contact.find_by(code: 'FIRST0:SH8013').phone.should == phone # aka not changed
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should honor chg value over add value when both changes same attribute' do
|
it 'should honor chg value over add value when both changes same attribute' do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue