diff --git a/test/integration/parsers/twitter_item_test.rb b/test/integration/parsers/twitter_item_test.rb index 96a016e6..6176d916 100644 --- a/test/integration/parsers/twitter_item_test.rb +++ b/test/integration/parsers/twitter_item_test.rb @@ -14,7 +14,7 @@ class TwitterItemIntegrationTest < ActiveSupport::TestCase test "should return data even if a the twitter item does not exist" do m = create_media url: 'https://twitter.com/caiosba/status/1111111111111111111' data = m.as_json - assert_match 'https://twitter.com/caiosba/status/1111111111111111111', data['title'] + assert_match /caiosba\/status\/1111111111111111111/, data['title'] assert_match 'caiosba', data['author_name'] assert_match '@caiosba', data['username'] assert_not_nil data['author_picture'] diff --git a/test/integration/parsers/twitter_profile_test.rb b/test/integration/parsers/twitter_profile_test.rb index ae173034..0e56541b 100644 --- a/test/integration/parsers/twitter_profile_test.rb +++ b/test/integration/parsers/twitter_profile_test.rb @@ -4,7 +4,7 @@ class TwitterProfileIntegrationTest < ActiveSupport::TestCase test "should parse shortened URL" do m = create_media url: 'http://bit.ly/23qFxCn' data = m.as_json - assert_equal 'https://twitter.com/caiosba', data['url'] + assert_match /caiosba/, data['url'] assert_not_nil data['title'] assert_match '@caiosba', data['username'] assert_equal 'twitter', data['provider'] @@ -16,7 +16,7 @@ class TwitterProfileIntegrationTest < ActiveSupport::TestCase test "should return data even if a the twitter profile does not exist" do m = create_media url: 'https://twitter.com/dlihfbfyhugsrb' data = m.as_json - assert_equal 'https://twitter.com/dlihfbfyhugsrb', data['url'] + assert_match /dlihfbfyhugsrb/, data['url'] assert_equal 'dlihfbfyhugsrb', data['title'] assert_match '@dlihfbfyhugsrb', data['username'] assert_equal 'twitter', data['provider']