nijie: normalize all thumbnail urls (#3919).

This commit is contained in:
evazion
2018-09-23 18:45:08 -05:00
parent d294514dc0
commit 5525bbe1ca
3 changed files with 32 additions and 23 deletions

View File

@@ -1,22 +0,0 @@
require "test_helper"
module Downloads
class NijieTest < ActiveSupport::TestCase
context "downloading a 'http://nijie.info/view.php?id=:id' url" do
should "download the original file" do
@source = "http://nijie.info/view.php?id=213043"
@rewrite = "https://pic03.nijie.info/nijie_picture/728995_20170505014820_0.jpg"
assert_rewritten(@rewrite, @source)
assert_downloaded(132_555, @source)
end
end
context "downloading a 'https://pic*.nijie.info/nijie_picture/:id.jpg' url" do
should "download the original file" do
@source = "https://pic03.nijie.info/nijie_picture/728995_20170505014820_0.jpg"
assert_not_rewritten(@source)
assert_downloaded(132_555, @source)
end
end
end
end