Added ident country code and improved other ident things

This commit is contained in:
Priit Tark 2015-02-18 15:26:51 +02:00
parent e9b77c5b0f
commit 44f11de5c8
13 changed files with 117 additions and 66 deletions

View file

@ -44,7 +44,7 @@ describe 'EPP Contact', epp: true do
},
voice: { value: '+372.1234567' },
email: { value: 'test@example.example' },
ident: { value: '37605030299', attrs: { type: 'priv' } }
ident: { value: '37605030299', attrs: { type: 'priv', cc: 'EE' } }
}
create_xml = @epp_xml.create(defaults.deep_merge(overwrites), @legal_document)
epp_plain_request(create_xml, :xml)
@ -331,12 +331,6 @@ describe 'EPP Contact', epp: true do
end
context 'info command' do
before :all do
@registrar1_contact = Fabricate(
:contact, code: 'info-4444', registrar: @registrar1,
name: 'Johnny Awesome', address: Fabricate(:address))
end
def info_request(overwrites = {})
defaults = {
id: { value: @contact.code },
@ -363,6 +357,10 @@ describe 'EPP Contact', epp: true do
end
it 'return info about contact' do
@registrar1_contact = Fabricate(
:contact, code: 'info-4444', registrar: @registrar1,
name: 'Johnny Awesome', address: Fabricate(:address))
response = info_request({ id: { value: @registrar1_contact.code } })
response[:msg].should == 'Command completed successfully'
response[:result_code].should == '1000'

View file

@ -16,7 +16,7 @@ describe 'EPP Domain', epp: true do
Fabricate(:contact, code: 'citizen_1234')
Fabricate(:contact, code: 'sh8013')
Fabricate(:contact, code: 'sh801333')
Fabricate(:contact, code: 'juridical_1234', ident_type: 'ico')
Fabricate(:contact, code: 'juridical_1234', ident_type: 'bic')
Fabricate(:reserved_domain)
@uniq_no = proc { @i ||= 0; @i += 1 }
@ -669,8 +669,8 @@ describe 'EPP Domain', epp: true do
})
response = epp_plain_request(xml, :xml)
response[:result_code].should == '2004'
response[:msg].should == 'Admin contacts count must be between 1-10'
response[:result_code].should == '2004'
response[:clTRID].should == 'ABC-12345'
Domain.count.should == domain_count
@ -686,8 +686,8 @@ describe 'EPP Domain', epp: true do
})
response = epp_plain_request(xml, :xml)
response[:result_code].should == '2306'
response[:msg].should == 'Admin contact can be only citizen'
response[:result_code].should == '2306'
end
end