aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs b/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs
index 7cb3e61724..a7491f42e9 100644
--- a/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs
+++ b/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs
@@ -59,4 +59,20 @@ public class FFProbeVideoInfoTests
Assert.Equal(chaptersCount, chapters.Length);
}
+
+ [Theory]
+ [InlineData(1L)]
+ [InlineData(TimeSpan.TicksPerMinute * 3)]
+ [InlineData(TimeSpan.TicksPerMinute * 5)]
+ [InlineData((TimeSpan.TicksPerMinute * 5) + 1)]
+ [InlineData((TimeSpan.TicksPerMinute * 50) + 1)]
+ public void CreateDummyChapters_PositiveRuntime_NoChapterBeyondRuntime(long runtime)
+ {
+ var chapters = _fFProbeVideoInfo.CreateDummyChapters(new Video()
+ {
+ RunTimeTicks = runtime
+ });
+
+ Assert.All(chapters, chapter => Assert.True(chapter.StartPositionTicks < runtime));
+ }
}