Skip to content

Commit

Permalink
Adds turkish phone number formats and test. (#1106)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ZASMan authored and vbrazo committed May 22, 2018
1 parent 1380eb2 commit ea829c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions lib/locales/tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
Expand Down
4 changes: 4 additions & 0 deletions test/test_tr_locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea829c5

Please sign in to comment.