photoprism/internal/search/subjects_test.go

20 lines
436 B
Go
Raw Normal View History

package search
2021-09-02 16:12:31 +02:00
import (
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photoprism/internal/form"
2021-09-02 16:12:31 +02:00
"github.com/stretchr/testify/assert"
)
func TestSubjects(t *testing.T) {
2021-09-02 16:12:31 +02:00
t.Run("FindAll", func(t *testing.T) {
results, err := Subjects(form.SubjectSearch{Type: entity.SubjPerson})
2021-09-02 16:12:31 +02:00
assert.NoError(t, err)
// t.Logf("Subjects: %#v", results)
2021-09-02 16:12:31 +02:00
assert.LessOrEqual(t, 3, len(results))
})
}