photoprism/internal/query/counts_test.go

18 lines
361 B
Go
Raw Normal View History

package query
import (
"github.com/stretchr/testify/assert"
"testing"
)
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)
}