mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +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
|
@ -39,6 +39,32 @@ describe Contact do
|
|||
end
|
||||
end
|
||||
|
||||
describe Contact, '#crID' do
|
||||
before(:each) { Fabricate(:contact, code: "asd12", created_by: Fabricate(:epp_user)) }
|
||||
|
||||
it 'should return username of creator' do
|
||||
expect(Contact.first.crID).to eq('gitlab')
|
||||
end
|
||||
|
||||
it 'should return nil when no creator' do
|
||||
expect(Contact.new.crID).to be nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe Contact, '#upID' do
|
||||
before(:each) { Fabricate(:contact, code: "asd12", created_by: Fabricate(:epp_user), updated_by: Fabricate(:epp_user)) }
|
||||
|
||||
it 'should return username of updater' do
|
||||
expect(Contact.first.upID).to eq('gitlab')
|
||||
end
|
||||
|
||||
it 'should return nil when no updater' do
|
||||
expect(Contact.new.upID).to be nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe Contact, '.check_availability' do
|
||||
|
||||
before(:each) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue