photoprism/pkg/fs/file_formats_test.go

26 lines
597 B
Go

package fs
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestFileFormats_Markdown(t *testing.T) {
t.Run("All", func(t *testing.T) {
f := Extensions.Formats(true)
rows, cols := f.Table(true, true, true)
assert.NotEmpty(t, rows)
assert.NotEmpty(t, cols)
assert.Len(t, cols, 4)
assert.GreaterOrEqual(t, len(rows), 30)
})
t.Run("Compact", func(t *testing.T) {
f := Extensions.Formats(true)
rows, cols := f.Table(false, false, false)
assert.NotEmpty(t, rows)
assert.NotEmpty(t, cols)
assert.Len(t, cols, 1)
assert.GreaterOrEqual(t, len(rows), 30)
})
}