Sha256: f9056fd5cb65c86292f79d6e61d4ae8f8e039abfdca5fe56d4304b6fa8a4d228

Contents?: true

Size: 695 Bytes

Versions: 5

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

require_relative 'helper'

class TestAddressMX < Test::Unit::TestCase
  include DeterministicHelper

  assert_methods_are_deterministic(
    FFaker::AddressMX,
    :municipality, :postal_code, :state_abbr, :state, :zip_code
  )

  def test_mx_state
    assert_match(/[\sa-z]/i, FFaker::AddressMX.state)
  end

  def test_mx_state_abbr
    assert_match(/[A-Z]/, FFaker::AddressMX.state_abbr)
  end

  def test_postal_code
    assert_match(/[0-9]/, FFaker::AddressMX.postal_code)
  end

  def test_zip_code
    assert_match(/[0-9]/, FFaker::AddressMX.zip_code)
  end

  def test_mx_municipality
    assert_match(/[\sa-z]/i, FFaker::AddressMX.municipality)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ffaker-2.23.0 test/test_address_mx.rb
ffaker-2.22.0 test/test_address_mx.rb
ffaker-2.21.0 test/test_address_mx.rb
ffaker-2.20.0 test/test_address_mx.rb
ffaker-2.19.0 test/test_address_mx.rb