photoprism/internal/commands/show_config_options_test.go
2023-07-20 20:02:02 +02:00

27 lines
558 B
Go
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package commands
import (
"testing"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/pkg/capture"
"github.com/stretchr/testify/assert"
)
func TestShowConfigOptionsCommand(t *testing.T) {
var err error
ctx := config.CliTestContext()
output := capture.Output(func() {
err = ShowConfigOptionsCommand.Run(ctx)
})
if err != nil {
t.Fatal(err)
}
assert.Contains(t, output, "PHOTOPRISM_IMPORT_PATH")
assert.Contains(t, output, "--sidecar-path")
assert.Contains(t, output, "sidecar `PATH`*optional*")
}