photoprism/pkg/txt/slug_test.go
2020-11-21 18:08:41 +01:00

16 lines
302 B
Go

package txt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSlugToTitle(t *testing.T) {
t.Run("cute_Kitten", func(t *testing.T) {
assert.Equal(t, "Cute-Kitten", SlugToTitle("cute-kitten"))
})
t.Run("empty", func(t *testing.T) {
assert.Equal(t, "", SlugToTitle(""))
})
}