Fix handling of PART messages with no reason
This commit is contained in:
parent
52f929ec45
commit
50dc0ef64f
6 changed files with 56 additions and 41 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue