Support changing the nick by clicking it in MessageInput

This commit is contained in:
Ken-Håvard Lieng 2017-06-21 07:23:07 +02:00
parent 4a74463ae8
commit f174d98107
16 changed files with 335 additions and 134 deletions

View file

@ -304,3 +304,21 @@ func TestHandleIRCMotd(t *testing.T) {
Content: []string{"line 1", "line 2"},
}, <-s.broadcast)
}
func TestHandleIRCBadNick(t *testing.T) {
c := irc.NewClient("nick", "user")
c.Host = "host.com"
s := NewSession(nil)
i := newIRCHandler(c, s)
i.dispatchMessage(&irc.Message{
Command: irc.ErrErroneousNickname,
})
// It should print the error message first
<-s.broadcast
checkResponse(t, "nick_fail", NickFail{
Server: "host.com",
}, <-s.broadcast)
}