photoprism/pkg/txt/keywords_test.go
Michael Mayer f8a45b14d9 Backend: Move reusable packages to pkg/
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-01-12 14:00:56 +01:00

18 lines
337 B
Go

package txt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestKeywords(t *testing.T) {
t.Run("cat", func(t *testing.T) {
keywords := Keywords("cat")
assert.Equal(t, []string{"cat"}, keywords)
})
t.Run("was", func(t *testing.T) {
keywords := Keywords("was")
assert.Equal(t, []string(nil), keywords)
})
}