c98ed8a125
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
22 lines
428 B
Go
22 lines
428 B
Go
package query
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
|
)
|
|
|
|
func TestQuery_GetMomentsTime(t *testing.T) {
|
|
conf := config.TestConfig()
|
|
|
|
search := New(conf.Db())
|
|
|
|
t.Run("result found", func(t *testing.T) {
|
|
result, err := search.GetMomentsTime()
|
|
|
|
assert.Nil(t, err)
|
|
assert.Equal(t, 2790, result[0].PhotoYear)
|
|
assert.Equal(t, 2, result[0].Count)
|
|
})
|
|
}
|