REMOVE IBAN EXAMPLE SUMMARY AND ADD JSON FIXTURES
This commit removes the implementation summary for IBAN test coverage and adds a new module to generate test fixtures in JSON format from the IBAN examples.
This commit is contained in:
2000
test/support/iban_test_fixtures.json
Normal file
2000
test/support/iban_test_fixtures.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -212,7 +212,11 @@ defp filter_by_numeric_only(specs, nil), do: specs
|
||||
|
||||
defp filter_by_numeric_only(specs, numeric_only) do
|
||||
Enum.filter(specs, fn {_code, spec} ->
|
||||
is_numeric_only?(spec["bban_spec"]) == numeric_only
|
||||
# Use numeric_only field if available, otherwise fall back to bban_spec check
|
||||
case spec["numeric_only"] do
|
||||
nil -> is_numeric_only?(spec["bban_spec"]) == numeric_only
|
||||
value -> value == numeric_only
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -222,7 +226,8 @@ defp has_branch_code?(spec) do
|
||||
end
|
||||
|
||||
defp has_national_check?(spec) do
|
||||
Map.has_key?(spec["positions"], "national_check")
|
||||
positions = spec["positions"]["national_check"]
|
||||
positions != nil and positions["start"] != positions["end"]
|
||||
end
|
||||
|
||||
defp is_numeric_only?(bban_spec) do
|
||||
|
||||
Reference in New Issue
Block a user