tests: fix unit tests.

This commit is contained in:
evazion
2021-09-11 20:37:18 -05:00
parent eab4e165b1
commit 8dbeec4788
2 changed files with 6 additions and 1 deletions

View File

@@ -208,7 +208,7 @@ class MediaFileTest < ActiveSupport::TestCase
assert_equal(3, @preview.channels)
assert_equal(:srgb, @preview.colorspace)
assert_equal([120, 150], @preview.dimensions)
assert_equal([115, 150], @preview.dimensions)
end
end

View File

@@ -2,6 +2,11 @@ require 'test_helper'
module Sources
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
setup do
@site = Sources::Strategies.find("https://www.weibo.com/5501756072/J2UNKfbqV?type=comment#_rnd1590548401855")