Sha256: 4c1af79371225b4a7387f39108e2f932d53fda95e62525e5954f2e8353920752
Contents?: true
Size: 1.28 KB
Versions: 5
Compression:
Stored size: 1.28 KB
Contents
# => author: wiseleyb # => email: wiseleyb@gmail.com require 'helper' class TestAddressAU < Test::Unit::TestCase def test_au_state_abbr arr = Faker::AddressAU::STATE_ABBR.sort assert arr = Faker::AddressAU::SUBURB.keys.sort assert arr = Faker::AddressAU::POSTCODE.keys.sort end def test_au_state assert_match /[ a-z]/, Faker::AddressAU.state end def test_au_state_abbr assert_match /[A-Z]/, Faker::AddressAU.state_abbr end def test_au_suburb assert_match /[a-zA-Z]/, Faker::AddressAU.suburb end def test_postcode assert_match /\d{4}/, Faker::AddressAU.postcode end def test_full_address assert_match /[\, a-z]/, Faker::AddressAU.full_address end def test_postcode_frozen assert Faker::AddressAU.postcode.frozen? == false end def test_au_suburb_with_states Faker::AddressAU::STATE_ABBR.each do |st_abbr| assert_match /[a-zA-Z]/, Faker::AddressAU.suburb(st_abbr) end end def test_postcode_with_states Faker::AddressAU::STATE_ABBR.each do |st_abbr| assert_match /\d{4}/, Faker::AddressAU.postcode(st_abbr) end end def test_full_address_with_states Faker::AddressAU::STATE_ABBR.each do |st_abbr| assert_match /[\, a-z]/, Faker::AddressAU.full_address(st_abbr) end end end
Version data entries
5 entries across 5 versions & 1 rubygems