mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 10:19:45 +02:00
Contact - Registrar relation
This commit is contained in:
parent
9519538744
commit
3d652bf85b
11 changed files with 90 additions and 16 deletions
|
@ -25,7 +25,8 @@ describe Contact do
|
|||
phone: ['Required parameter missing - phone', 'Phone nr is invalid'],
|
||||
email: ['Required parameter missing - email', 'Email is invalid'],
|
||||
ident: ['Required parameter missing - ident'],
|
||||
address: ['is missing']
|
||||
address: ['is missing'],
|
||||
registrar: ['is missing']
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -73,11 +74,13 @@ end
|
|||
|
||||
describe Contact, '#up_id' do
|
||||
before(:each) do
|
||||
Fabricate(:contact, code: 'asd12', created_by: Fabricate(:epp_user), updated_by: Fabricate(:epp_user))
|
||||
#Fabricate(:contact, code: 'asd12', created_by: Fabricate(:epp_user), updated_by: Fabricate(:epp_user), registrar: zone)
|
||||
@epp_user = Fabricate(:epp_user)
|
||||
@contact = Fabricate.build(:contact, code: 'asd12', created_by: @epp_user, updated_by: @epp_user)
|
||||
end
|
||||
|
||||
it 'should return username of updater' do
|
||||
expect(Contact.first.up_id).to eq('gitlab')
|
||||
expect(@contact.up_id).to eq('gitlab')
|
||||
end
|
||||
|
||||
it 'should return nil when no updater' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue