Sha256: 52b6be7b547b71776489ec9f524feb8fd779036b2bb396849ac05798c6be027b

Contents?: true

Size: 758 Bytes

Versions: 4

Compression:

Stored size: 758 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)
  end

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

  def test_se_full_address
    assert_match(/[\, a-z]/, Faker::AddressSE.full_address)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
ffakerer-1.0.2 test/test_address_se.rb
ffakerer-1.0.1 test/test_address_se.rb
ffaker-1.22.1 test/test_address_se.rb
ffaker-1.22.0 test/test_address_se.rb