Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Canadian Country Code #1824

Merged
merged 1 commit into from
Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/locales/en-CA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ en-CA:
state: [Alberta, British Columbia, Manitoba, New Brunswick, Newfoundland and Labrador, Nova Scotia, Northwest Territories, Nunavut, Ontario, Prince Edward Island, Quebec, Saskatchewan, Yukon]
state_abbr: ["AB", "BC", "MB", "NB", "NL", "NS", "NU", "NT", "ON", "PE", "QC", "SK", "YT"]
default_country: [Canada]
country_code: [CA]

internet:
free_email: [gmail.com, yahoo.ca, hotmail.com]
Expand Down
1 change: 1 addition & 0 deletions test/test_en_ca_locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def test_en_ca_address_methods
assert Faker::Address.state_abbr.is_a? String
assert Faker::Address.default_country.is_a? String
assert_equal 'Canada', Faker::Address.default_country
assert_equal 'CA', Faker::Address.country_code

expected = /[A-VX-Y][0-9][A-CEJ-NPR-TV-Z] ?[0-9][A-CEJ-NPR-TV-Z][0-9]/
assert_match(expected, Faker::Address.postcode)
Expand Down