Added ident country code error #2590

This commit is contained in:
Priit Tark 2015-06-01 17:48:23 +03:00
parent f5feba0509
commit 4448284680
5 changed files with 24 additions and 5 deletions

View file

@ -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