Sha256: e4c08ee13746afd49fb0af4160afb20a326efdab828a025b0022ae3d396f5796

Contents?: true

Size: 702 Bytes

Versions: 10

Compression:

Stored size: 702 Bytes

Contents

# encoding: utf-8

require 'helper'

class TestAddressSE < Test::Unit::TestCase

  ALPHA = /\A[[:alpha:]]+/
  DIGIT = /\d{1}/

  def test_se_city
    assert_match ALPHA, Faker::AddressSE.city
  end

  def test_se_zip_code
    assert_match(/\d{2}/, Faker::AddressSE.zip_code)
  end

  def test_countries
    assert Faker::AddressSE::COUNTRIES.include?(Faker::AddressSE.random_country)
  end

  def test_se_full_address
    address = Faker::AddressSE.full_address
    assert_match ALPHA, address
    assert_match DIGIT, address
    assert_match(/SVERIGE/, address)
    assert_match(/[\, a-z]/, address)
  end

  def test_se_zip_code_frozen
    assert Faker::AddressSE.zip_code.frozen? == false
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/ffaker-1.32.1/test/test_address_se.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/ffaker-1.32.1/test/test_address_se.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/ffaker-1.32.1/test/test_address_se.rb
ffaker-1.32.1 test/test_address_se.rb
ffaker-1.32.0 test/test_address_se.rb
ffaker-1.31.0 test/test_address_se.rb
ffaker-1.30.0 test/test_address_se.rb
ffaker-1.25.0 test/test_address_se.rb
ffaker-1.24.0 test/test_address_se.rb
ffaker-1.23.0 test/test_address_se.rb