2020-01-05 13:18:40 +00:00
|
|
|
package query
|
2019-12-28 19:24:20 +00:00
|
|
|
|
|
|
|
import (
|
2020-01-27 16:19:47 +00:00
|
|
|
"github.com/stretchr/testify/assert"
|
2019-12-28 19:24:20 +00:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
|
|
|
)
|
|
|
|
|
2020-03-28 16:17:41 +00:00
|
|
|
func TestQuery_CategoryLabels(t *testing.T) {
|
2019-12-28 19:24:20 +00:00
|
|
|
conf := config.TestConfig()
|
|
|
|
|
2020-03-28 14:29:17 +00:00
|
|
|
search := New(conf.Db())
|
2019-12-28 19:24:20 +00:00
|
|
|
|
|
|
|
categories := search.CategoryLabels(1000, 0)
|
|
|
|
|
2020-04-09 17:39:09 +00:00
|
|
|
assert.GreaterOrEqual(t, 1, len(categories))
|
2019-12-28 19:24:20 +00:00
|
|
|
}
|