Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds turkish phone number formats and test. #1106

Merged
merged 3 commits into from
May 22, 2018
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


def test_tr_book_fields
assert Faker::Book.title.is_a? String
assert Faker::Book.author.is_a? String
Expand Down