Add a little test

This commit is contained in:
Corey Johnson 2019-12-06 14:33:04 -08:00
parent f70473c234
commit eb414bf2a1

View file

@ -362,3 +362,10 @@ func TestPRView_branchWithOwnerArg(t *testing.T) {
url := seenCmd.Args[len(seenCmd.Args)-1]
eq(t, url, "https://github.com/hubot/REPO/pull/23")
}
func TestReplaceExcessiveWhitespace(t *testing.T) {
eq(t, replaceExcessiveWhitespace("hello\ngoodbye"), "hello goodbye")
eq(t, replaceExcessiveWhitespace(" hello goodbye "), "hello goodbye")
eq(t, replaceExcessiveWhitespace("hello goodbye"), "hello goodbye")
eq(t, replaceExcessiveWhitespace(" hello \n goodbye "), "hello goodbye")
}