27 lines
433 B
Go
27 lines
433 B
Go
package query
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"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)
|
|
}
|
|
}
|
|
|
|
func TestResetSubjects(t *testing.T) {
|
|
assert.NoError(t, ResetSubjects())
|
|
}
|