Merge pull request #4639 from nonamethanks/fix_pixiv_en_links

Update artist finder blacklist
This commit is contained in:
evazion
2021-01-04 01:15:15 -06:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -164,6 +164,13 @@ class ArtistTest < ActiveSupport::TestCase
assert_artist_not_found("http://i2.pixiv.net/img28/img/kyang692/35563903.jpg")
end
should "ignore /en/ pixiv url matches" do
a1 = FactoryBot.create(:artist, :name => "vvv", :url_string => "https://www.pixiv.net/en/users/32072927/artworks")
a2 = FactoryBot.create(:artist, :name => "c01a", :url_string => "https://www.pixiv.net/en/users/31744504")
assert_artist_not_found("https://www.pixiv.net/en/artworks/85241178")
assert_artist_not_found("https://www.pixiv.net/en/users/85241178")
end
should "find matches by url" do
a1 = FactoryBot.create(:artist, :name => "rembrandt", :url_string => "http://rembrandt.com/x/test.jpg")
a2 = FactoryBot.create(:artist, :name => "subway", :url_string => "http://subway.com/x/test.jpg")