mirror of https://github.com/fluffle/goirc
Mock dispatcher for testing.
This commit is contained in:
parent
0d7d875b9f
commit
4e7f272b3f
|
@ -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...)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue