Fix handling of PART messages with no reason

This commit is contained in:
Ken-Håvard Lieng 2017-04-04 22:57:01 +02:00
parent 52f929ec45
commit 50dc0ef64f
6 changed files with 56 additions and 41 deletions

View file

@ -85,12 +85,22 @@ func TestHandleIRCPart(t *testing.T) {
})
checkResponse(t, "part", Part{
Join: Join{
Server: "host.com",
User: "parting",
Channels: []string{"#chan"},
},
Reason: "the reason",
Server: "host.com",
User: "parting",
Channel: "#chan",
Reason: "the reason",
}, res)
res = dispatchMessage(&irc.Message{
Command: irc.Part,
Nick: "parting",
Params: []string{"#chan"},
})
checkResponse(t, "part", Part{
Server: "host.com",
User: "parting",
Channel: "#chan",
}, res)
}