photoprism/internal/query/categories_test.go

19 lines
323 B
Go
Raw Normal View History

package query
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCategoryLabels(t *testing.T) {
categories := CategoryLabels(1000, 0)
assert.GreaterOrEqual(t, 1, len(categories))
2020-05-13 10:16:12 +02:00
assert.LessOrEqual(t, 1, len(categories))
for _, r := range categories {
assert.IsType(t, CategoryLabel{}, r)
}
}