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

This commit is contained in:
Martin Lensment 2014-08-05 16:08:38 +03:00
commit 356835bebf
7 changed files with 66 additions and 6 deletions

View file

@ -77,7 +77,7 @@ describe 'EPP Contact', epp: true do
end
it 'returns info about contact' do
Fabricate(:contact, :name => "Johnny Awesome")
Fabricate(:contact, name: "Johnny Awesome", created_by_id: '1')
Fabricate(:address)
response = epp_request('contacts/info.xml')
@ -88,5 +88,14 @@ describe 'EPP Contact', epp: true do
expect(contact.css('name').first.text).to eq('Johnny Awesome')
end
it 'it doesn\'t display unassociated object' do
Fabricate(:contact, name:"Johnny Awesome", created_by_id: '240')
Fabricate(:epp_user, id: 240)
response = epp_request('contacts/info.xml')
expect(response[:result_code]).to eq('2201')
expect(response[:msg]).to eq('Authorization error')
end
end
end