Sha256: dfdd825845fe49486dd5e315488b5ab32b85644c366f986802c1c247b2227399

Contents?: true

Size: 744 Bytes

Versions: 8

Compression:

Stored size: 744 Bytes

Contents

# encoding: utf-8

require 'helper'

# Test features related to Finnish addresses
class TestAddressFI < Test::Unit::TestCase
  ALPHA = /\A[[:alpha:]]+/
  DIGIT = /\d{1}/

  def test_fi_city
    assert_match ALPHA, Faker::AddressFI.city
  end

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

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

  def test_fi_full_address
    address = Faker::AddressFI.full_address
    assert_match ALPHA, address
    assert_match DIGIT, address
    assert_match(/SUOMI/, address)
    assert_match(/[\, a-z]/, address)
  end

  def test_fi_zip_code_frozen
    assert Faker::AddressFI.zip_code.frozen? == false
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

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