photoprism/internal/classify/rules_test.go
2021-02-21 17:18:36 +01:00

15 lines
300 B
Go

package classify
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLabelRules_Find(t *testing.T) {
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)
}