From 2c9e046a3e06ce5a9482ef624a71bdef4640a913 Mon Sep 17 00:00:00 2001 From: HassanAkbar Date: Sun, 10 Aug 2025 14:18:58 +0500 Subject: [PATCH] Add Estonia country_code --- lib/locales/ee.yml | 2 ++ test/test_ee_locale.rb | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/lib/locales/ee.yml b/lib/locales/ee.yml index e0c65a9b9e..2b9d1df936 100644 --- a/lib/locales/ee.yml +++ b/lib/locales/ee.yml @@ -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## ####"] diff --git a/test/test_ee_locale.rb b/test/test_ee_locale.rb index 6f6d4afb7b..be59ec7a7a 100644 --- a/test/test_ee_locale.rb +++ b/test/test_ee_locale.rb @@ -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 @@ -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