mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
Add some new contact fields to registrar
This commit is contained in:
parent
0c16146ebb
commit
65d849cc36
10 changed files with 81 additions and 24 deletions
|
@ -4,6 +4,7 @@ describe Keyrelay do
|
|||
it { should belong_to(:domain) }
|
||||
it { should belong_to(:requester) }
|
||||
it { should belong_to(:accepter) }
|
||||
it { should have_many(:legal_documents) }
|
||||
|
||||
it 'is in pending status' do
|
||||
kr = Fabricate(:keyrelay)
|
||||
|
|
|
@ -5,4 +5,32 @@ describe Registrar do
|
|||
it { should have_many(:domains) }
|
||||
it { should have_many(:api_users) }
|
||||
it { should have_many(:messages) }
|
||||
|
||||
context 'with invalid attribute' do
|
||||
before :all do
|
||||
@registrar = Registrar.new
|
||||
end
|
||||
|
||||
it 'is not valid' do
|
||||
@registrar.valid?
|
||||
@registrar.errors.full_messages.should match_array([
|
||||
'Address is missing',
|
||||
'Contact e-mail is missing',
|
||||
'Country is missing',
|
||||
'Name is missing',
|
||||
'Reg no is missing'
|
||||
])
|
||||
end
|
||||
|
||||
it 'returns an error with invalid email' do
|
||||
@registrar.email = 'bla'
|
||||
@registrar.billing_email = 'bla'
|
||||
|
||||
@registrar.valid?
|
||||
@registrar.errors[:email].should == ['is invalid']
|
||||
@registrar.errors[:billing_email].should == ['is invalid']
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue