photoprism/internal/classify/rules_test.go

16 lines
300 B
Go
Raw Normal View History

package classify
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLabelRules_Find(t *testing.T) {
2021-09-23 23:46:17 +02:00
result, ok := Rules.Find("cat")
assert.True(t, ok)
assert.Equal(t, "cat", result.Label)
assert.Equal(t, "animal", result.Categories[0])
assert.Equal(t, 5, result.Priority)
}