photoprism/internal/query/subjects_test.go

28 lines
433 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)
}
}
2021-08-19 23:12:51 +02:00
func TestResetSubjects(t *testing.T) {
assert.NoError(t, ResetSubjects())
}