pawoo: fix tests.

This commit is contained in:
evazion
2022-12-10 19:12:46 -06:00
parent 993e4fd62f
commit 20a2652c1e
4 changed files with 7 additions and 41 deletions

View File

@@ -1,35 +0,0 @@
require "test_helper"
module Downloads
class PawooTest < ActiveSupport::TestCase
context "downloading a 'https://pawoo.net/web/statuses/:id' url" do
should "download the original file" do
skip "Pawoo keys not set" unless Danbooru.config.pawoo_client_id
@source = "https://pawoo.net/web/statuses/1202176"
@rewrite = "https://img.pawoo.net/media_attachments/files/000/128/953/original/4c0a06087b03343f.png"
assert_rewritten(@rewrite, @source)
assert_downloaded(7680, @source)
end
end
context "downloading a 'https://pawoo.net/:user/:id' url" do
should "download the original file" do
skip "Pawoo keys not set" unless Danbooru.config.pawoo_client_id
@source = "https://pawoo.net/@9ed00e924818/1202176"
@rewrite = "https://img.pawoo.net/media_attachments/files/000/128/953/original/4c0a06087b03343f.png"
assert_rewritten(@rewrite, @source)
assert_downloaded(7680, @source)
end
end
context "downloading a 'https://img.pawoo.net/media_attachments/:id/small/:file' url" do
should "download the original file" do
skip "Pawoo keys not set" unless Danbooru.config.pawoo_client_id
@source = "https://img.pawoo.net/media_attachments/files/000/128/953/small/4c0a06087b03343f.png"
@rewrite = "https://img.pawoo.net/media_attachments/files/000/128/953/original/4c0a06087b03343f.png"
assert_rewritten(@rewrite, @source)
assert_downloaded(7680, @source)
end
end
end
end