posts: fix exception when post has source like 'https://www.twitter.com/username'.
`twitter.com` sources worked but `www.twitter.com` didn't. Also match the URL by class instead of by site name to ensure we match the expected class.
This commit is contained in:
@@ -302,6 +302,7 @@ module Sources
|
||||
assert_equal(source2, Sources::Strategies.normalize_source(source2))
|
||||
assert_equal(source2, Sources::Strategies.normalize_source(source3))
|
||||
assert_equal(source2, Sources::Strategies.normalize_source(source4))
|
||||
assert_equal("https://www.twitter.com/irt_5433", Sources::Strategies.normalize_source("https://www.twitter.com/irt_5433"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user