Skip to content

Commit

Permalink
Merge pull request #54 from arhs/53-fix-ivory-coast-structure
Browse files Browse the repository at this point in the history
Fix #53 IBAN specification for Côte d'Ivoire.
  • Loading branch information
LaurentVB authored Aug 23, 2018
2 parents 1e51589 + 7ba2db8 commit 716b7f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iban.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
// Benin
addSpecification(new Specification("BJ", 28, "F24", "BJ39123456789012345678901234"));
// Ivory
addSpecification(new Specification("CI", 28, "U01F23", "CI17A12345678901234567890123"));
addSpecification(new Specification("CI", 28, "U02F22", "CI70CI1234567890123456789012"));
// Cameron
addSpecification(new Specification("CM", 27, "F23", "CM9012345678901234567890123"));
// Cape Verde
Expand Down
6 changes: 5 additions & 1 deletion test/ibanTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ describe('IBAN', function(){
it('should return true for a valid Saint-Lucia IBAN', function(){
expect(IBAN.isValid('LC55HEMM000100010012001200023015')).to.be.true;
});

it('should return false for an incorrect check digit', function(){
expect(IBAN.isValid('BE68539007547035')).to.be.false;
});

it('should return true for a valid Côte d\'Ivoire IBAN', function(){
expect(IBAN.isValid('CI93CI0080111301134291200589')).to.be.true;
});

it('should return true for all examples', function(){
Object.keys(IBAN.countries).forEach(function(countryCode){
Expand Down

0 comments on commit 716b7f4

Please sign in to comment.