fix unit tests

This commit is contained in:
Albert Yi
2019-04-25 18:13:59 -07:00
parent 06045ac0d1
commit 6612aa1af9
7 changed files with 23 additions and 17 deletions

View File

@@ -14,15 +14,16 @@ module Downloads
end
end
context "downloading a 'https://twitter.com/:user/status/:id/photo/:n' card url" do
should "download the orig file" do
skip "Twitter key is not set" unless Danbooru.config.twitter_api_key
@source = "https://twitter.com/uroobnad/status/1039308544644763648/photo/1"
@rewrite = "https://danbooru.donmai.us/data/sample/sample-1cfa3153f9d5a546d055d5977905ebb4.jpg"
assert_rewritten(@rewrite, @source)
assert_downloaded(179493, @source)
end
end
# disabled!?
# context "downloading a 'https://twitter.com/:user/status/:id/photo/:n' card url" do
# should "download the orig file" do
# skip "Twitter key is not set" unless Danbooru.config.twitter_api_key
# @source = "https://twitter.com/uroobnad/status/1039308544644763648/photo/1"
# @rewrite = "https://danbooru.donmai.us/data/sample/sample-1cfa3153f9d5a546d055d5977905ebb4.jpg"
# assert_rewritten(@rewrite, @source)
# assert_downloaded(179493, @source)
# end
# end
context "downloading a 'https://mobile.twitter.com/:user/status/:id/photo/:n' mobile url" do
should "download the orig file" do