forked from faker-ruby/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new translations to the en-ZA locale (faker-ruby#1338)
* Adds many more South African cities, names and company names * Adds some company type names * Fixes typo * Add en-ZA locale tests * Update changelog * Add another test
- Loading branch information
Showing
3 changed files
with
55 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'test_helper' | ||
|
||
class TestEnZaLocale < Test::Unit::TestCase | ||
def setup | ||
Faker::Config.locale = 'en-ZA' | ||
end | ||
|
||
def teardown | ||
Faker::Config.locale = nil | ||
end | ||
|
||
def test_en_za_internet_domain_suffix | ||
assert Faker::Internet.domain_suffix.is_a? String | ||
end | ||
|
||
def test_en_za_address | ||
assert Faker::Address.country_code.is_a? String | ||
assert Faker::Address.default_country.is_a? String | ||
assert Faker::Address.post_code.is_a? String | ||
assert Faker::Address.province.is_a? String | ||
assert Faker::Address.state.is_a? String | ||
end | ||
|
||
def test_en_za_company | ||
assert Faker::Company.name.is_a? String | ||
assert Faker::Company.type.is_a? String | ||
assert Faker::Company.suffix.is_a? String | ||
end | ||
|
||
def test_en_za_name | ||
assert Faker::Name.first_name.is_a? String | ||
assert Faker::Name.last_name.is_a? String | ||
end | ||
end |