Backend: Add test cases to TestWords

This commit is contained in:
Theresa Gresch 2020-05-18 11:12:40 +02:00
parent d2975666e5
commit d4e3c675c5

View file

@ -15,6 +15,18 @@ func TestWords(t *testing.T) {
result := Words("x")
assert.Equal(t, []string(nil), result)
})
t.Run("Österreich Urlaub", func(t *testing.T) {
result := Words("Österreich Urlaub")
assert.Equal(t, []string{"Österreich", "Urlaub"}, result)
})
t.Run("Schäferhund", func(t *testing.T) {
result := Words("Schäferhund")
assert.Equal(t, []string{"Schäferhund"}, result)
})
t.Run("Île de la Réunion", func(t *testing.T) {
result := Words("Île de la Réunion")
assert.Equal(t, []string{"Île", "Réunion"}, result)
})
}
func TestReplaceSpaces(t *testing.T) {