mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
CLI: Code clean-up #2252
This commit is contained in:
@@ -22,7 +22,7 @@ func TestShowConfigCommand(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Expected config command output.
|
||||
// Check the command output for plausibility.
|
||||
assert.Contains(t, output, "config-path")
|
||||
assert.Contains(t, output, "originals-path")
|
||||
assert.Contains(t, output, "import-path")
|
||||
@@ -31,6 +31,27 @@ func TestShowConfigCommand(t *testing.T) {
|
||||
assert.Contains(t, output, "darktable-cli")
|
||||
}
|
||||
|
||||
func TestShowTagsCommand(t *testing.T) {
|
||||
var err error
|
||||
|
||||
ctx := config.CliTestContext()
|
||||
|
||||
output := capture.Output(func() {
|
||||
err = ShowTagsCommand.Run(ctx)
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Check the command output for plausibility.
|
||||
assert.Contains(t, output, "Exiftool")
|
||||
assert.Contains(t, output, "Adobe XMP")
|
||||
assert.Contains(t, output, "Dublin Core")
|
||||
assert.Contains(t, output, "Title")
|
||||
assert.Contains(t, output, "Description")
|
||||
}
|
||||
|
||||
func TestShowFiltersCommand(t *testing.T) {
|
||||
var err error
|
||||
|
||||
@@ -44,7 +65,7 @@ func TestShowFiltersCommand(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Expected config command output.
|
||||
// Check the command output for plausibility.
|
||||
assert.Contains(t, output, "landscape")
|
||||
assert.Contains(t, output, "live")
|
||||
assert.Contains(t, output, "Examples")
|
||||
@@ -65,7 +86,7 @@ func TestShowFormatsCommand(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Expected config command output.
|
||||
// Check the command output for plausibility.
|
||||
assert.Contains(t, output, "JPEG")
|
||||
assert.Contains(t, output, "MP4")
|
||||
assert.Contains(t, output, "Image")
|
||||
|
||||
Reference in New Issue
Block a user