nijie: normalize all thumbnail urls (#3919).
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user