deviantart: fix artist finder for profile urls missing the 'www'.

Fix the artist finder to work when the profile url in the artist entry
is missing the 'www'. Example:

  https://deviantart.com/noizave
  https://www.deviantart.com/noizave
This commit is contained in:
evazion
2018-09-07 11:36:48 -05:00
parent 06cf32160b
commit 610391205f
2 changed files with 17 additions and 2 deletions

View File

@@ -229,5 +229,14 @@ module Sources
assert_match(%r!"Print available at Inprnt":\[http://www.inprnt.com/gallery/teemutaiga/kisu\]!, @site.dtext_artist_commentary_desc)
end
end
context "An artist entry with a profile url that is missing the 'www'" do
should "still find the artist" do
@site = Sources::Strategies.find("http://noizave.deviantart.com/art/test-post-please-ignore-685436408")
@artist = FactoryBot.create(:artist, name: "noizave", url_string: "https://deviantart.com/noizave")
assert_equal([@artist], @site.artists)
end
end
end
end