tests: move twitter canonical url test.
This commit is contained in:
@@ -2,19 +2,6 @@ require 'test_helper'
|
||||
|
||||
module Downloads
|
||||
class FileTest < ActiveSupport::TestCase
|
||||
context "A twitter video download" do
|
||||
setup do
|
||||
skip "Twitter is not configured" unless Danbooru.config.twitter_api_key
|
||||
@source = "https://twitter.com/CincinnatiZoo/status/859073537713328129"
|
||||
@download = Downloads::File.new(@source)
|
||||
end
|
||||
|
||||
should "preserve the twitter source" do
|
||||
@download.download!
|
||||
assert_equal("https://twitter.com/CincinnatiZoo/status/859073537713328129", @download.source)
|
||||
end
|
||||
end
|
||||
|
||||
context "A post download" do
|
||||
setup do
|
||||
@source = "http://www.google.com/intl/en_ALL/images/logo.gif"
|
||||
|
||||
@@ -30,8 +30,9 @@ module Sources
|
||||
@site = Sources::Strategies.find("https://twitter.com/CincinnatiZoo/status/859073537713328129")
|
||||
end
|
||||
|
||||
should "get the image url" do
|
||||
should "get the correct urls" do
|
||||
assert_equal("https://video.twimg.com/ext_tw_video/859073467769126913/pu/vid/1280x720/cPGgVROXHy3yrK6u.mp4", @site.image_url)
|
||||
assert_equal("https://twitter.com/CincinnatiZoo/status/859073537713328129", @site.canonical_url)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user