tests: fix unit tests.
This commit is contained in:
@@ -208,7 +208,7 @@ class MediaFileTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
assert_equal(3, @preview.channels)
|
assert_equal(3, @preview.channels)
|
||||||
assert_equal(:srgb, @preview.colorspace)
|
assert_equal(:srgb, @preview.colorspace)
|
||||||
assert_equal([120, 150], @preview.dimensions)
|
assert_equal([115, 150], @preview.dimensions)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,11 @@ require 'test_helper'
|
|||||||
|
|
||||||
module Sources
|
module Sources
|
||||||
class WeiboTest < ActiveSupport::TestCase
|
class WeiboTest < ActiveSupport::TestCase
|
||||||
|
setup do
|
||||||
|
# Add a random delay to work around test failures due to rate limiting by Weibo.
|
||||||
|
sleep (3..5).to_a.sample
|
||||||
|
end
|
||||||
|
|
||||||
context "A post with multiple pictures" do
|
context "A post with multiple pictures" do
|
||||||
setup do
|
setup do
|
||||||
@site = Sources::Strategies.find("https://www.weibo.com/5501756072/J2UNKfbqV?type=comment#_rnd1590548401855")
|
@site = Sources::Strategies.find("https://www.weibo.com/5501756072/J2UNKfbqV?type=comment#_rnd1590548401855")
|
||||||
|
|||||||
Reference in New Issue
Block a user