Sha256: 573d67dc8511c3505824117ebe6f5d887417a8063969603cb648be81e27f34ce
Contents?: true
Size: 681 Bytes
Versions: 6
Compression:
Stored size: 681 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') class TestEnUgLocale < Test::Unit::TestCase def setup @previous_locale = Faker::Config.locale Faker::Config.locale = 'en-UG' end def teardown Faker::Config.locale = @previous_locale end def test_validity_of_phone_number validation_regex = /^((0)|(256)|(\+256))((39)|(41))\d{7}$/ assert_match(validation_regex, Faker::PhoneNumber.phone_number.gsub(' ','')) end def test_validity_of_cell_phone validation_regex = /^((0)|(256)|(\+256))((70)|(71)|(72)|(74)|(75)|(77)|(78)|(79))\d{7}$/ assert_match(validation_regex, Faker::PhoneNumber.cell_phone.gsub(' ','')) end end
Version data entries
6 entries across 6 versions & 2 rubygems