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:
@@ -360,6 +360,8 @@ class UploadsControllerTest < ActionDispatch::IntegrationTest
|
||||
should_upload_successfully("http://wwwew.web.fc2.com/e/405.jpg")
|
||||
|
||||
should_upload_successfully("http://www.tinami.com/view/1087268")
|
||||
|
||||
should_upload_successfully("https://booth.pximg.net/4ee2c0d9-41fa-4a0e-a30f-1bc9e15d4e5b/i/2586180/331b7c5f-7614-4772-aae2-cb979ad44a6b.png")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user