mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
created_by and updated_by logic for contact#info
This commit is contained in:
parent
3dca771bcb
commit
902cb8d441
7 changed files with 66 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue