photoprism/internal/commands/find_test.go
Michael Mayer a5dd49152d Tests: Run "make fmt"
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-02-14 20:17:58 +01:00

28 lines
575 B
Go

package commands
import (
"testing"
"github.com/photoprism/photoprism/pkg/capture"
"github.com/stretchr/testify/assert"
)
func TestFindCommand(t *testing.T) {
t.Run("All", func(t *testing.T) {
var err error
// Create test context with flags and arguments.
ctx := NewTestContext([]string{"find", "--csv"})
// Run command with test context.
output := capture.Output(func() {
err = FindCommand.Run(ctx)
})
// Check command output for plausibility.
//t.Logf(output)
assert.NoError(t, err)
assert.Contains(t, output, "File Name;Mime Type;")
})
}