photoprism/internal/query/subjects_test.go

24 lines
355 B
Go
Raw Normal View History

package query
import (
"testing"
2021-08-13 20:50:49 +02:00
"github.com/photoprism/photoprism/internal/entity"
"github.com/stretchr/testify/assert"
)
func TestSubjects(t *testing.T) {
results, err := Subjects(3, 0)
if err != nil {
t.Fatal(err)
}
assert.GreaterOrEqual(t, len(results), 1)
for _, val := range results {
assert.IsType(t, entity.Subject{}, val)
}
}