pixiv: fix failure to upload bad pixiv id images (fix #4031)

Bug: Uploading bad pixiv id images failed because the pixiv strategy
raised a BadIDError exception when the upload service checked for the
ugoira frame data.
This commit is contained in:
evazion
2019-01-03 18:01:20 -06:00
parent 7478c7a913
commit 04d5b16da7
3 changed files with 12 additions and 5 deletions

View File

@@ -168,10 +168,13 @@ module Sources
end
end
context "fetching source data for a deleted work" do
should "return the same url" do
get_source("https://i.pximg.net/img-original/img/2017/11/22/01/06/44/65991677_p0.png")
assert_equal(["https://i.pximg.net/img-original/img/2017/11/22/01/06/44/65991677_p0.png"], @site.image_urls)
context "A deleted pixiv post" do
should "not fail when fetching the source data" do
@source = "https://i.pximg.net/img-original/img/2018/12/30/01/04/55/72373728_p0.png"
get_source(@source)
assert_equal([@source], @site.image_urls)
assert_nothing_raised { @site.to_h }
end
end