photoprism/internal/util/keywords_test.go

19 lines
338 B
Go
Raw Normal View History

2019-12-17 17:02:56 +01:00
package util
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)
})
}