mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-11 16:24:11 +01:00
20 lines
440 B
Go
20 lines
440 B
Go
package encode
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestFindEncoder(t *testing.T) {
|
|
t.Run("Software", func(t *testing.T) {
|
|
assert.Equal(t, "libx264", FindEncoder("software").String())
|
|
})
|
|
t.Run("Apple", func(t *testing.T) {
|
|
assert.Equal(t, "h264_videotoolbox", FindEncoder("apple").String())
|
|
})
|
|
t.Run("Unsupported", func(t *testing.T) {
|
|
assert.Equal(t, "libx264", FindEncoder("xxx").String())
|
|
})
|
|
}
|