Sha256: cee07d98c19b52e816b5eeccc436ecf4d199356f7054c8c821280f301a247dbd

Contents?: true

Size: 604 Bytes

Versions: 3

Compression:

Stored size: 604 Bytes

Contents

# encoding: utf-8

require 'helper'

# Author: wiseleyb<wiseleyb@gmail.com>
class TestPhoneNumberNL < Test::Unit::TestCase
  def setup
    @tester = FFaker::PhoneNumberNL
  end

  def test_mobile_phone_prefix
    assert @tester.mobile_phone_number.start_with?('06')
  end

  def test_phone_prefix
    assert @tester.phone_number.start_with?('0')
  end

  def test_phone_number
    10.times do
      assert_match /^0([\s\-]*\d){9}$/, @tester.phone_number
    end
  end

  def test_international_phone_number
    10.times do
      assert_match /^\+31/, @tester.international_phone_number
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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