Refactor websocket handler

This commit is contained in:
Ken-Håvard Lieng 2015-06-17 00:46:58 +02:00
parent 047027ddec
commit 114bf8201e
8 changed files with 257 additions and 226 deletions

View file

@ -43,9 +43,9 @@ func dispatchMessage(msg *irc.Message) WSResponse {
return <-s.out
}
func checkResponse(t *testing.T, expectedType string, expectedResponse interface{}, res WSResponse) {
func checkResponse(t *testing.T, expectedType string, expectedData interface{}, res WSResponse) {
assert.Equal(t, expectedType, res.Type)
assert.Equal(t, expectedResponse, res.Response)
assert.Equal(t, expectedData, res.Data)
}
func TestHandleIRCNick(t *testing.T) {