mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Ident type update #2834
This commit is contained in:
parent
2a81641130
commit
fd52172500
9 changed files with 32 additions and 25 deletions
|
@ -53,8 +53,8 @@ describe Contact do
|
|||
@contact.errors[:phone].should == ["Phone nr is invalid"]
|
||||
end
|
||||
|
||||
it 'should require country code when bic' do
|
||||
@contact.ident_type = 'bic'
|
||||
it 'should require country code when org' do
|
||||
@contact.ident_type = 'org'
|
||||
@contact.valid?
|
||||
@contact.errors[:ident_country_code].should == ['is missing']
|
||||
end
|
||||
|
@ -66,7 +66,7 @@ describe Contact do
|
|||
end
|
||||
|
||||
it 'should validate correct country code' do
|
||||
@contact.ident_type = 'bic'
|
||||
@contact.ident_type = 'org'
|
||||
@contact.ident_country_code = 'EE'
|
||||
@contact.valid?
|
||||
|
||||
|
@ -75,7 +75,7 @@ describe Contact do
|
|||
|
||||
it 'should require valid country code' do
|
||||
@contact.ident = '123'
|
||||
@contact.ident_type = 'bic'
|
||||
@contact.ident_type = 'org'
|
||||
@contact.ident_country_code = 'INVALID'
|
||||
@contact.valid?
|
||||
|
||||
|
@ -84,7 +84,7 @@ describe Contact do
|
|||
end
|
||||
|
||||
it 'should convert to alpha2 country code' do
|
||||
@contact.ident_type = 'bic'
|
||||
@contact.ident_type = 'org'
|
||||
@contact.ident_country_code = 'ee'
|
||||
@contact.valid?
|
||||
|
||||
|
@ -148,8 +148,8 @@ describe Contact do
|
|||
@contact.domains_present?.should == false
|
||||
end
|
||||
|
||||
it 'bic should be valid' do
|
||||
@contact.ident_type = 'bic'
|
||||
it 'org should be valid' do
|
||||
@contact.ident_type = 'org'
|
||||
@contact.ident = '1234'
|
||||
@contact.valid?
|
||||
@contact.errors.full_messages.should match_array([])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue