Refactor websocket handler
This commit is contained in:
parent
047027ddec
commit
114bf8201e
8 changed files with 257 additions and 226 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue