photoprism/internal/commands/config_test.go
Michael Mayer 1c53a565a7 Configure on-demand rendering of regular thumbnail sizes #294
Can be enabled by setting PHOTOPRISM_RESAMPLE_UNCACHED to true

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-05 15:42:54 +02:00

30 lines
720 B
Go

package commands
import (
"testing"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/pkg/capture"
"github.com/stretchr/testify/assert"
)
func TestConfigCommand(t *testing.T) {
var err error
ctx := config.CliTestContext()
output := capture.Output(func() {
err = ConfigCommand.Run(ctx)
})
assert.Contains(t, output, "NAME VALUE")
assert.Contains(t, output, "config-file")
assert.Contains(t, output, "darktable-cli")
assert.Contains(t, output, "originals-path")
assert.Contains(t, output, "import-path")
assert.Contains(t, output, "cache-path")
assert.Contains(t, output, "assets-path")
assert.Equal(t, output, output)
assert.Nil(t, err)
}