diff --git a/client/connection_test.go b/client/connection_test.go index 9f04114..03efd05 100644 --- a/client/connection_test.go +++ b/client/connection_test.go @@ -10,3 +10,10 @@ func setUp(t *testing.T) (*mockNetConn, *Conn) { c.postConnect() return m, c } + +// Mock dispatcher to verify that events are triggered successfully +type mockDispatcher func(string, ...interface{}) + +func (d mockDispatcher) Dispatch(name string, ev ...interface{}) { + d(name, ev...) +}