This commit is contained in:
r888888888
2017-12-15 17:21:33 -08:00
parent eab63daa29
commit b5d72ae8d8
2 changed files with 11 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ module Sources::Strategies
attr_reader :image_urls
def self.url_match?(url)
self.status_id_from_url(url).present?
url =~ %r{^https?://(?:mobile\.)?twitter\.com}i
end
def referer_url

View File

@@ -158,5 +158,15 @@ module Sources
assert_equal(tags, @site.tags)
end
end
context "#normalize_for_artist_finder!" do
setup do
@site = Sources::Site.new("https://twitter.com/BLAH")
end
should "downcase the url" do
assert_equal("https://twitter.com/blah", @site.normalize_for_artist_finder!)
end
end
end
end