Disabled contact org

This commit is contained in:
Priit Tark 2015-03-10 10:56:55 +02:00
parent 67f23d2769
commit 94a3b7beff
5 changed files with 40 additions and 6 deletions

View file

@ -138,15 +138,20 @@ describe 'EPP Contact', epp: true do
end
it 'successfully saves custom code' do
response = create_request(
{ id: { value: '12345' } }
)
response = create_request({ id: { value: '12345' } })
response[:msg].should == 'Command completed successfully'
response[:result_code].should == '1000'
Contact.last.code.should == 'registrar1:12345'
end
it 'should return parameter value policy errror' do
response = create_request({ postalInfo: { org: { value: 'should not save' } } })
response[:msg].should == 'Parameter value policy error'
response[:result_code].should == '2306'
Contact.last.org_name.should == nil
end
end
context 'update command' do
@ -269,6 +274,19 @@ describe 'EPP Contact', epp: true do
Contact.find_by(code: 'sh8013').ident_type.should == 'birthday'
end
it 'should return parameter value policy errror for org update' do
response = update_request({
id: { value: 'sh8013' },
chg: {
postalInfo: { org: { value: 'should not save' } }
}
})
response[:msg].should == 'Parameter value policy error'
response[:result_code].should == '2306'
Contact.find_by(code: 'sh8013').org_name.should == nil
end
end
context 'delete command' do