2023-07-20 17:58:53 +02:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
2023-07-20 19:17:45 +02:00
|
|
|
"testing"
|
|
|
|
|
2023-07-20 17:58:53 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
|
|
|
"github.com/photoprism/photoprism/pkg/capture"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestShowThumbSizesCommand(t *testing.T) {
|
|
|
|
var err error
|
|
|
|
|
|
|
|
ctx := config.CliTestContext()
|
|
|
|
|
|
|
|
output := capture.Output(func() {
|
|
|
|
err = ShowThumbSizesCommand.Run(ctx)
|
|
|
|
})
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
assert.Contains(t, output, "fit_2048")
|
|
|
|
assert.Contains(t, output, "Mosaic View")
|
|
|
|
assert.Contains(t, output, "Color Detection")
|
|
|
|
}
|