mirror of
https://github.com/fluffle/goirc
synced 2025-05-14 11:33:20 +00:00
Make enabling/disabling state-tracking easier. Improve constructors.
This commit is contained in:
parent
6e87169e2c
commit
aa75e0e0c6
4 changed files with 78 additions and 33 deletions
|
@ -1,6 +1,7 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"github.com/fluffle/goirc/event"
|
||||
"github.com/fluffle/goirc/logging"
|
||||
"github.com/fluffle/goirc/state"
|
||||
"gomock.googlecode.com/hg/gomock"
|
||||
|
@ -20,9 +21,10 @@ type testState struct {
|
|||
func setUp(t *testing.T) (*Conn, *testState) {
|
||||
ctrl := gomock.NewController(t)
|
||||
st := state.NewMockStateTracker(ctrl)
|
||||
r := event.NewRegistry()
|
||||
l := logging.NewMockLogger(ctrl)
|
||||
nc := MockNetConn(t)
|
||||
c := New("test", "test", "Testing IRC", false, nil, l)
|
||||
c := Client("test", "test", "Testing IRC", r, l)
|
||||
|
||||
// We don't want to have to specify s.log.EXPECT().Debug() for all the
|
||||
// random crap that gets logged. This mocks it all out nicely.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue