mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Added ident country code error #2590
This commit is contained in:
parent
f5feba0509
commit
4448284680
5 changed files with 24 additions and 5 deletions
|
@ -73,11 +73,13 @@ describe Contact do
|
|||
end
|
||||
|
||||
it 'should require valid country code' do
|
||||
@contact.ident = '123'
|
||||
@contact.ident_type = 'bic'
|
||||
@contact.ident_country_code = 'INVALID'
|
||||
@contact.valid?
|
||||
|
||||
@contact.errors[:ident_country_code].should == ['is not following ISO_3166-1 alpha 2 format']
|
||||
@contact.errors[:ident].should ==
|
||||
['Ident country code is not valid, should be in ISO_3166-1 alpha 2 format']
|
||||
end
|
||||
|
||||
it 'should convert to alpha2 country code' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue