Fix #5078: Pixiv booth upload broken.

Allow image URLs from https://booth.pximg.net to be uploaded. Fix bug
where Booth.pm URLs were incorrectly caught by the Pixiv extractor.
This commit is contained in:
evazion
2022-03-30 03:22:02 -05:00
parent 04551b8154
commit a272c19b98
5 changed files with 77 additions and 1 deletions

View File

@@ -200,6 +200,12 @@ class ArtistURLTest < ActiveSupport::TestCase
assert_equal("http://www.instagram.com/itomugi/", url.normalized_url)
end
should "normalize Booth.pm urls" do
url = create(:artist_url, url: "http://mesh-mesh.booth.pm/items/746971")
assert_equal("https://mesh-mesh.booth.pm", url.url)
assert_equal("http://mesh-mesh.booth.pm/", url.normalized_url)
end
context "#search method" do
subject { ArtistURL }