test/test_avatar.rb in faker-1.4.3 vs test/test_avatar.rb in faker-1.5.0

- old
+ new

@@ -12,11 +12,11 @@ def test_avatar_with_param assert @tester.image('faker').match(/http:\/\/robohash\.org\/(.+)\.png/)[1] == 'faker' end def test_avatar_with_correct_size - assert @tester.image('faker', '150x320').match(/http:\/\/robohash\.org\/faker\.png\?size=(.+)/)[1] == '150x320' + assert @tester.image('faker', '150x320').match(/http:\/\/robohash\.org\/faker\.png\?size=(.+)&.*/)[1] == '150x320' end def test_avatar_with_incorrect_size assert_raise ArgumentError do @tester.image(nil, '150x320z') @@ -31,6 +31,9 @@ assert_raise ArgumentError do @tester.image(nil, '300x300', 'wrong_format') end end + def test_avatar_with_set + assert @tester.image('faker', '300x300', 'jpg', 'set2').match(/http:\/\/robohash\.org\/faker\.jpg.*set=set2/) + end end