photoprism/internal/meta/codec_test.go

26 lines
361 B
Go
Raw Normal View History

package meta
import (
"testing"
2020-11-21 18:08:41 +01:00
"github.com/stretchr/testify/assert"
)
func TestData_CodecAvc1(t *testing.T) {
t.Run("true", func(t *testing.T) {
data := Data{
Codec: "avc1",
}
assert.Equal(t, true, data.CodecAvc())
})
t.Run("false", func(t *testing.T) {
data := Data{
Codec: "heic",
}
assert.Equal(t, false, data.CodecAvc())
})
}