photoprism/internal/query/duplicates_test.go
Michael Mayer b072a18a17 Backend: Run "make fmt" with Go v1.19
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-08-10 16:09:21 +02:00

28 lines
493 B
Go

package query
import (
"testing"
"github.com/stretchr/testify/assert"
)
// TODO find duplicates
func TestDuplicates(t *testing.T) {
t.Run("success", func(t *testing.T) {
if files, err := Duplicates(10, 0, ""); err != nil {
t.Fatal(err)
} else if files == nil {
t.Fatal("files must not be nil")
}
})
t.Run("pathname not empty", func(t *testing.T) {
files, err := Duplicates(10, 0, "/holiday/sea.jpg")
if err != nil {
t.Fatal(err)
}
assert.Empty(t, files)
})
}