photoprism/internal/classify/rules_test.go
Michael Mayer e9874d6e0c Backend: Compile labels into source #160
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-01-09 01:21:09 +01:00

14 lines
276 B
Go

package classify
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLabelRules_Find(t *testing.T) {
result := rules.Find("cat")
assert.Equal(t, "cat", result.Label)
assert.Equal(t, "animal", result.Categories[0])
assert.Equal(t, 5, result.Priority)
}