From d9fac06298d9c896a089a015f9545b903e0b3325 Mon Sep 17 00:00:00 2001 From: Ricardo Pacheco Date: Mon, 22 Mar 2021 11:58:30 -0300 Subject: [PATCH 1/5] Fix Update brazilian phone country code This fix method cell_phone_in_e164 for brazil. --- lib/locales/pt-BR.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/locales/pt-BR.yml b/lib/locales/pt-BR.yml index 553cf7162a..055a3da7a4 100644 --- a/lib/locales/pt-BR.yml +++ b/lib/locales/pt-BR.yml @@ -653,6 +653,7 @@ pt-BR: - "#{Team.main_teams}" sport: ['handebol', 'basquete', 'futebol', 'UFC', 'volĂȘi', 'tĂȘnis'] + country_code: ['55'] phone_number: subscriber_number: ['####'] area_code: ["11", "12", "13", "14", "15", "16", "17", "18", "19", "21", "22", "24", "27", "28", "31", "32", "33", "34", "35", "37", "38", "41", "42", "43", "44", "45", "46", "47", "48", "49", "51", "53", "54", "55", "61", "62", "63", "64", "65", "66", "67", "68", "69", "71", "73", "74", "75", "77", "79", "81", "82", "83", "84", "85", "86", "87", "88", "89", "91", "92", "93", "94", "95", "96", "97", "98", "99"] From c6efa410b4b355c7d21063e0c705241af5e18476 Mon Sep 17 00:00:00 2001 From: Ricardo Pacheco Date: Tue, 30 Mar 2021 08:16:40 -0300 Subject: [PATCH 2/5] Add test to brazilian phone number country code --- test/test_pt_br_locale.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_pt_br_locale.rb b/test/test_pt_br_locale.rb index 6c999134c6..41f0a8ff6c 100644 --- a/test/test_pt_br_locale.rb +++ b/test/test_pt_br_locale.rb @@ -35,6 +35,10 @@ def test_pt_br_address_methods assert Faker::Address.street_name.is_a? String assert Faker::Address.default_country, 'Brasil' end + + def test_pt_br_phone_methods + asset_equal Faker::PhoneNumber.country_code, "+55" + end def test_pt_br_color_methods assert Faker::Color.hex_color.is_a? String From 51db3c5ae2dc4972f4bf814e9e1476e20866fc3b Mon Sep 17 00:00:00 2001 From: Ricardo Pacheco Date: Tue, 30 Mar 2021 08:18:48 -0300 Subject: [PATCH 3/5] Fix Rubocop Warnings --- test/test_pt_br_locale.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_pt_br_locale.rb b/test/test_pt_br_locale.rb index 41f0a8ff6c..875095cc32 100644 --- a/test/test_pt_br_locale.rb +++ b/test/test_pt_br_locale.rb @@ -37,7 +37,7 @@ def test_pt_br_address_methods end def test_pt_br_phone_methods - asset_equal Faker::PhoneNumber.country_code, "+55" + asset_equal Faker::PhoneNumber.country_code, '+55' end def test_pt_br_color_methods From dc29c41e6d21f284b099e1fdf6503f152ae57b8f Mon Sep 17 00:00:00 2001 From: Ricardo Pacheco Date: Tue, 30 Mar 2021 08:20:42 -0300 Subject: [PATCH 4/5] Fix Rubocop warning --- test/test_pt_br_locale.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_pt_br_locale.rb b/test/test_pt_br_locale.rb index 875095cc32..5cdc19bb9e 100644 --- a/test/test_pt_br_locale.rb +++ b/test/test_pt_br_locale.rb @@ -35,7 +35,7 @@ def test_pt_br_address_methods assert Faker::Address.street_name.is_a? String assert Faker::Address.default_country, 'Brasil' end - + def test_pt_br_phone_methods asset_equal Faker::PhoneNumber.country_code, '+55' end From 605c4db4a542388ef6cd6badde6f0a3637ac669b Mon Sep 17 00:00:00 2001 From: Ricardo Pacheco Date: Tue, 30 Mar 2021 08:22:25 -0300 Subject: [PATCH 5/5] Fix Syntax --- test/test_pt_br_locale.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_pt_br_locale.rb b/test/test_pt_br_locale.rb index 5cdc19bb9e..8f295ac490 100644 --- a/test/test_pt_br_locale.rb +++ b/test/test_pt_br_locale.rb @@ -37,7 +37,7 @@ def test_pt_br_address_methods end def test_pt_br_phone_methods - asset_equal Faker::PhoneNumber.country_code, '+55' + assert_equal Faker::PhoneNumber.country_code, '+55' end def test_pt_br_color_methods