From ea829c511e38bb71be9d0eeedddfa647b3d37831 Mon Sep 17 00:00:00 2001 From: Zane Date: Tue, 22 May 2018 08:07:01 -0400 Subject: [PATCH] Adds turkish phone number formats and test. (#1106) * Adds turkish phone number formats and a test. Adds changelog and fixes violations Adds turkish phone number formats and a test. Adds changelog and fixes violations * Updates changelog --- CHANGELOG.md | 1 + lib/locales/tr.yml | 2 ++ test/test_tr_locale.rb | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 817f0866c5..dbdc213b73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Additions** +- [PR #1106](https://github.com/stympy/faker/pull/1106/files) Adds turkish phone number formats [@zasman](https://github.com/ZASMan) - [PR #1239](https://github.com/stympy/faker/pull/1239) Update Faker::Food ([susiirwin](https://github.com/susiirwin)) - [PR #900](https://github.com/stympy/faker/pull/900) Add Japanese lorem words to locale [@vietqhoang](https://github.com/vietqhoang) - [PR #987](https://github.com/stympy/faker/pull/987) Add Faker::Cannabis class [@GhostGroup](https://github.com/GhostGroup) diff --git a/lib/locales/tr.yml b/lib/locales/tr.yml index 3d13811bfb..43edfc924c 100644 --- a/lib/locales/tr.yml +++ b/lib/locales/tr.yml @@ -17,6 +17,8 @@ tr: domain_suffix: [co, com, com.tr, net, org] safe_email: ['mesela.com'] + phone_number: + formats: ["90-###-###-####", "90.###.###.####", "90 ### ### ####", "90##########"] address: city_name: ['İstanbul', 'İzmir', 'Eskişehir', 'Şırnak', 'Edirne', 'Van' ] diff --git a/test/test_tr_locale.rb b/test/test_tr_locale.rb index 0be983a0f4..d59591431a 100644 --- a/test/test_tr_locale.rb +++ b/test/test_tr_locale.rb @@ -33,6 +33,10 @@ def test_tr_address_fields assert Faker::Address.country.is_a? String end + def test_tr_phone_number_fields + assert Faker::PhoneNumber.phone_number.is_a? String + end + def test_tr_book_fields assert Faker::Book.title.is_a? String assert Faker::Book.author.is_a? String