Skip to content
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
2 changes: 2 additions & 0 deletions lib/locales/ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ ee:
- "#{first_name} #{last_name} #{last_name}"

phone_number:
country_code:
- "372"
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# ####"]
cell_phone:
formats: ["5### ####", "5## ####", "81## ####", "82## ####", "83## ####", "84## ####"]
7 changes: 7 additions & 0 deletions test/test_ee_locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def test_ee_address_methods
assert_kind_of String, Faker::Address.city
assert_kind_of String, Faker::Address.street_name
assert_kind_of String, Faker::Address.street_address
assert_kind_of String, Faker::Address.country_code
end

def test_ee_company_methods
Expand Down Expand Up @@ -58,6 +59,12 @@ def test_ee_phone_number
end
end

def test_ee_cell_phone_with_country_code
phone_number = Faker::PhoneNumber.phone_number_with_country_code

assert_match(/\+372\s?\d{3}\s?\d{4}/, phone_number)
end

def test_ee_cell_phone
deterministically_verify -> { Faker::PhoneNumber.cell_phone[0] }, depth: 5 do |cell_phone_prefix|
assert_include @valid_cell_phone_prefixes, cell_phone_prefix
Expand Down