photoprism/internal/thumb/video_test.go
Michael Mayer 3cf1c699df Video: Refactor FFmpeg Transcoding Size Limit #3466 #3498 #3549
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-18 15:15:04 +02:00

22 lines
706 B
Go

package thumb
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestVideoSize(t *testing.T) {
assert.Equal(t, Sizes[Fit720], VideoSize(720))
assert.Equal(t, Sizes[Fit720], VideoSize(1279))
assert.Equal(t, Sizes[Fit1280], VideoSize(1280))
assert.Equal(t, Sizes[Fit1280], VideoSize(1281))
assert.Equal(t, Sizes[Fit1920], VideoSize(1920))
assert.Equal(t, Sizes[Fit1920], VideoSize(2000))
assert.Equal(t, Sizes[Fit2048], VideoSize(2048))
assert.Equal(t, Sizes[Fit2560], VideoSize(3000))
assert.Equal(t, Sizes[Fit3840], VideoSize(0))
assert.Equal(t, Sizes[Fit3840], VideoSize(4000))
assert.Equal(t, Sizes[Fit7680], VideoSize(8000))
assert.Equal(t, Sizes[Fit7680], VideoSize(-1))
}