2020-07-13 11:40:49 +02:00
|
|
|
package query
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2020-11-21 18:08:41 +01:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
2020-07-13 11:40:49 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
}
|