Merge branch 'master' of github.com:domify/registry

This commit is contained in:
Martin Lensment 2015-06-02 13:18:34 +03:00
commit 7facd58f31
98 changed files with 1811 additions and 36 deletions

View file

@ -104,7 +104,7 @@ describe 'EPP Contact', epp: true do
log.api_user_registrar.should == 'registrar1'
end
it 'successfully saves ident type' do
it 'successfully saves ident type with legal document' do
extension = {
legalDocument: {
value: 'dGVzdCBmYWlsCg==',
@ -120,7 +120,9 @@ describe 'EPP Contact', epp: true do
response[:msg].should == 'Command completed successfully'
response[:result_code].should == '1000'
Contact.last.ident_type.should == 'birthday'
@contact = Contact.last
@contact.ident_type.should == 'birthday'
@contact.legal_documents.size.should == 1
end
it 'successfully adds registrar' do
@ -168,6 +170,19 @@ describe 'EPP Contact', epp: true do
response[:result_code].should == '2005'
end
it 'should not saves ident type with wrong country code' do
extension = {
ident: {
value: '1990-22-12',
attrs: { type: 'birthday', cc: 'WRONG' }
}
}
response = create_request({}, extension)
response[:msg].should ==
'Ident country code is not valid, should be in ISO_3166-1 alpha 2 format [ident]'
response[:result_code].should == '2005'
end
it 'should add registrar prefix for code when legacy prefix present' do
response = create_request({ id: { value: 'CID:FIRST0:abc:ABC:NEW:12345' } })
response[:msg].should == 'Command completed successfully'