photoprism/internal/query/counts_test.go
2020-11-21 18:08:41 +01:00

18 lines
362 B
Go

package query
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCounts_Refresh(t *testing.T) {
counts := Counts{Cameras: 0, Photos: 0}
assert.Equal(t, counts.Cameras, 0)
assert.Equal(t, counts.Photos, 0)
counts.Refresh()
assert.Greater(t, counts.Cameras, 0)
assert.Greater(t, counts.Photos, 0)
assert.Greater(t, counts.Albums, 0)
}