aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorWill Jessop <will@willj.net>2019-07-14 14:09:01 +0100
committerWill Jessop <will@willj.net>2019-07-14 14:09:01 +0100
commit564fd87b9932b26a4bf5945f33b6eae32b5c7e73 (patch)
tree14f67dc3e846abc83b8dc96495888e1fbd64d723 /activestorage
parent340667243c12b7ba879e0e2db71b3f8843f75379 (diff)
downloadrails-564fd87b9932b26a4bf5945f33b6eae32b5c7e73.tar.gz
rails-564fd87b9932b26a4bf5945f33b6eae32b5c7e73.tar.bz2
rails-564fd87b9932b26a4bf5945f33b6eae32b5c7e73.zip
Different versions of ffprobe can return subtly different video lengths
Specify a range so we can take this into account, but not get caught out by 0, nil or way too large values.
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/test/analyzer/video_analyzer_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/test/analyzer/video_analyzer_test.rb b/activestorage/test/analyzer/video_analyzer_test.rb
index 172a2f0aae..57e094908a 100644
--- a/activestorage/test/analyzer/video_analyzer_test.rb
+++ b/activestorage/test/analyzer/video_analyzer_test.rb
@@ -13,7 +13,7 @@ class ActiveStorage::Analyzer::VideoAnalyzerTest < ActiveSupport::TestCase
assert_equal 640, metadata[:width]
assert_equal 480, metadata[:height]
assert_equal [4, 3], metadata[:display_aspect_ratio]
- assert_equal 5.166648, metadata[:duration]
+ assert_equal true, metadata[:duration].between?(4, 6)
assert_not_includes metadata, :angle
end