Skip to content

Commit

Permalink
Merge pull request #116 from gocardless/danw/ca-national-id-length
Browse files Browse the repository at this point in the history
Add national_id_length for CA.
  • Loading branch information
danwakefield authored Oct 22, 2018
2 parents fb5bda1 + cab66f2 commit 345db83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/structures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ CA:
:bank_code_format: "\\d{4}"
:branch_code_format: "\\d{5}"
:account_number_format: "\\d{7,12}"
:national_id_length: 4
:pseudo_iban_bank_code_length: 4
:pseudo_iban_branch_code_length: 5
:pseudo_iban_account_number_length: 12
2 changes: 2 additions & 0 deletions spec/ibandit/iban_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@
its(:swift_bank_code) { is_expected.to eq("0036") }
its(:swift_branch_code) { is_expected.to eq("00063") }
its(:swift_account_number) { is_expected.to eq("000000123456") }
its(:swift_national_id) { is_expected.to eq("0036") }
its(:pseudo_iban) { is_expected.to eq("CAZZ003600063000000123456") }

its(:iban) { is_expected.to be_nil }
Expand All @@ -400,6 +401,7 @@
its(:swift_bank_code) { is_expected.to eq("0036") }
its(:swift_branch_code) { is_expected.to eq("00063") }
its(:swift_account_number) { is_expected.to eq("012345678900") }
its(:swift_national_id) { is_expected.to eq("0036") }
its(:pseudo_iban) { is_expected.to eq("CAZZ003600063012345678900") }

its(:iban) { is_expected.to be_nil }
Expand Down

0 comments on commit 345db83

Please sign in to comment.