Skip to content

Commit 42aec26

Browse files
authored
Add country_code to Estonia locale (locales/ee.yml) (#3111)
(fixes #3111)
1 parent efb7503 commit 42aec26

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/locales/ee.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ ee:
5555
- "#{first_name} #{last_name} #{last_name}"
5656

5757
phone_number:
58+
country_code:
59+
- "372"
5860
formats: ["32# ####", "33# ####", "35# ####", "38# ####", "39# ####", "43# ####", "44# ####", "45# ####", "46# ####", "47# ####", "48# ####", "61# ####", "62# ####", "63# ####", "64# ####", "65# ####", "66# ####", "67# ####", "68# ####", "69# ####", "7## ####", "71# ####", "72# ####", "73# ####", "74# ####", "75# ####", "76# ####", "77# ####", "78# ####", "79# ####", "88# ####"]
5961
cell_phone:
6062
formats: ["5### ####", "5## ####", "81## ####", "82## ####", "83## ####", "84## ####"]

test/test_ee_locale.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def test_ee_address_methods
2525
assert_kind_of String, Faker::Address.city
2626
assert_kind_of String, Faker::Address.street_name
2727
assert_kind_of String, Faker::Address.street_address
28+
assert_kind_of String, Faker::Address.country_code
2829
end
2930

3031
def test_ee_company_methods
@@ -58,6 +59,12 @@ def test_ee_phone_number
5859
end
5960
end
6061

62+
def test_ee_cell_phone_with_country_code
63+
phone_number = Faker::PhoneNumber.phone_number_with_country_code
64+
65+
assert_match(/\+372\s?\d{3}\s?\d{4}/, phone_number)
66+
end
67+
6168
def test_ee_cell_phone
6269
deterministically_verify -> { Faker::PhoneNumber.cell_phone[0] }, depth: 5 do |cell_phone_prefix|
6370
assert_include @valid_cell_phone_prefixes, cell_phone_prefix

0 commit comments

Comments
 (0)