Disabled fax

This commit is contained in:
Priit Tark 2015-03-16 17:23:05 +02:00
parent e00b81e6da
commit b52ec4e35e
3 changed files with 36 additions and 1 deletions

View file

@ -145,7 +145,7 @@ describe 'EPP Contact', epp: true do
Contact.last.code.should == 'registrar1:12345'
end
it 'should return parameter value policy errror' do
it 'should return parameter value policy error for org' do
response = create_request({ postalInfo: { org: { value: 'should not save' } } })
response[:msg].should ==
'Parameter value policy error. Org should be blank: postalInfo > org [org]'
@ -153,6 +153,15 @@ describe 'EPP Contact', epp: true do
Contact.last.org_name.should == nil
end
it 'should return parameter value policy error for fax' do
response = create_request({ fax: { value: 'should not save' } })
response[:msg].should ==
'Parameter value policy error. Fax should be blank: fax [fax]'
response[:result_code].should == '2306'
Contact.last.fax.should == nil
end
end
context 'update command' do
@ -289,6 +298,20 @@ describe 'EPP Contact', epp: true do
Contact.find_by(code: 'sh8013').org_name.should == nil
end
it 'should return parameter value policy errror for fax update' do
response = update_request({
id: { value: 'sh8013' },
chg: {
fax: { value: 'should not save' }
}
})
response[:msg].should ==
'Parameter value policy error. Fax should be blank: fax [fax]'
response[:result_code].should == '2306'
Contact.find_by(code: 'sh8013').fax.should == nil
end
end
context 'delete command' do