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