photoprism/internal/thumb/report_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

20 lines
430 B
Go

package thumb
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestReport(t *testing.T) {
t.Run("Videos", func(t *testing.T) {
rows, cols := Report(VideoSizes, true)
assert.Equal(t, 2, len(cols))
assert.Equal(t, len(VideoSizes), len(rows))
})
t.Run("Thumbs", func(t *testing.T) {
rows, cols := Report(Sizes.All(), false)
assert.Equal(t, 5, len(cols))
assert.Equal(t, len(Sizes), len(rows))
})
}