mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Always require contact.registrar
This commit is contained in:
parent
af53313608
commit
821fabd083
2 changed files with 14 additions and 4 deletions
|
@ -354,7 +354,7 @@ describe Contact, '.destroy_orphans' do
|
|||
end
|
||||
end
|
||||
|
||||
RSpec.describe Contact, db: false do
|
||||
RSpec.describe Contact do
|
||||
it { is_expected.to alias_attribute(:kind, :ident_type) }
|
||||
|
||||
describe '::names' do
|
||||
|
@ -400,6 +400,16 @@ RSpec.describe Contact, db: false do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'registrar validation', db: false do
|
||||
let(:contact) { described_class.new }
|
||||
|
||||
it 'rejects absent' do
|
||||
contact.registrar = nil
|
||||
contact.validate
|
||||
expect(contact.errors).to have_key(:registrar)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'address validation', db: false do
|
||||
let(:contact) { described_class.new }
|
||||
subject(:errors) { contact.errors }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue