photoprism/pkg/txt/slug_test.go

16 lines
301 B
Go
Raw Normal View History

2020-04-28 15:03:37 +00:00
package txt
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestSlugToTitle(t *testing.T) {
t.Run("cute_Kitten", func(t *testing.T) {
assert.Equal(t, "Cute-Kitten", SlugToTitle("cute-kitten"))
})
2020-04-28 15:25:14 +00:00
t.Run("empty", func(t *testing.T) {
assert.Equal(t, "", SlugToTitle(""))
})
2020-04-28 15:03:37 +00:00
}