Backend: Add title capitalization tests

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-06-01 13:31:49 +02:00
parent 716012aa8b
commit d580158c3b

View file

@ -73,6 +73,15 @@ func TestTitle(t *testing.T) {
t.Run("youtube", func(t *testing.T) {
assert.Equal(t, "YouTube", Title("youtube"))
})
t.Run("interpunctio-1", func(t *testing.T) {
assert.Equal(t, "This,,, Is !a ! a Very Strange Title....", Title("this,,, is !a ! a very strange title...."))
})
t.Run("interpunctio-2", func(t *testing.T) {
assert.Equal(t, "This Is a Not So Strange Title!", Title("This is a not so strange title!"))
})
t.Run("horse", func(t *testing.T) {
assert.Equal(t, "A Horse Is Not a Cow :-)", Title("a horse is not a cow :-)"))
})
}
func TestTitleFromFileName(t *testing.T) {