2020-04-07 12:51:01 +02:00
|
|
|
package query
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/entity"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
2020-05-08 15:41:01 +02:00
|
|
|
func TestAccountUploads(t *testing.T) {
|
2022-10-15 21:54:11 +02:00
|
|
|
a := entity.Service{ID: 1, SyncRaw: false}
|
2020-04-07 12:51:01 +02:00
|
|
|
|
|
|
|
t.Run("find uploads", func(t *testing.T) {
|
2020-05-08 15:41:01 +02:00
|
|
|
results, err := AccountUploads(a, 10)
|
2020-04-07 12:51:01 +02:00
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
// t.Logf("uploads: %+v", results)
|
|
|
|
|
|
|
|
assert.GreaterOrEqual(t, len(results), 1)
|
|
|
|
})
|
|
|
|
}
|