Sha256: 15ef9fea9ccca563888690be3fd584cedd86897cde598ad75a9f3723f04c5cc4

Contents?: true

Size: 708 Bytes

Versions: 3

Compression:

Stored size: 708 Bytes

Contents

# encoding: utf-8

require 'helper'

class TestAddressSE < Test::Unit::TestCase

  ALPHA = /\A[\p{Alpha}]+/
  DIGIT = /\d{1}/

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

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

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

  def test_se_full_address
    address = FFaker::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 FFaker::AddressSE.zip_code.frozen? == false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffaker-2.2.0 test/test_address_se.rb
ffaker-2.1.0 test/test_address_se.rb
ffaker-2.0.0 test/test_address_se.rb