diff options
author | Will Jessop <will@willj.net> | 2019-07-14 14:09:01 +0100 |
---|---|---|
committer | Will Jessop <will@willj.net> | 2019-07-14 14:09:01 +0100 |
commit | 564fd87b9932b26a4bf5945f33b6eae32b5c7e73 (patch) | |
tree | 14f67dc3e846abc83b8dc96495888e1fbd64d723 /activestorage/test | |
parent | 340667243c12b7ba879e0e2db71b3f8843f75379 (diff) | |
download | rails-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/test')
-rw-r--r-- | activestorage/test/analyzer/video_analyzer_test.rb | 2 |
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 |