test/test_faker_internet.rb in faker19-1.0.2 vs test/test_faker_internet.rb in faker19-1.0.3

- old
+ new

@@ -5,12 +5,16 @@ def setup @tester = Faker::Internet end def test_email - assert @tester.email.match(/.+@.+\.\w+/) + assert @tester.email.match(/^.+@.+\.\w+$/) end + + def test_email_with_suffix + assert @tester.email(nil, 3).match(/^.+3@.+\.\w+$/) + end def test_free_email assert @tester.free_email.match(/.+@(gmail|hotmail|yahoo)\.com/) end @@ -20,9 +24,13 @@ def test_user_name_with_arg assert @tester.user_name('bo peep').match(/(bo(_|\.)peep|peep(_|\.)bo)/) end + def test_user_name_with_suffix + assert @tester.user_name(nil, 3).match(/^.+3$/) + end + def test_domain_name assert @tester.domain_name.match(/\w+\.\w+/) end def test_domain_word