X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=room_test.go;h=3de419550ac0b0082b18776e8b45eb14ac467dc5;hb=e0ffe8ac287709ffa4af4e1325b86ad73d78ae50;hp=6bd1cb06464af365622445d515a661ac78f36e91;hpb=4f5fa5132780b50c7f2b51329b2a68d3cbbff939;p=goircd.git diff --git a/room_test.go b/room_test.go index 6bd1cb0..3de4195 100644 --- a/room_test.go +++ b/room_test.go @@ -26,14 +26,15 @@ func notEnoughParams(t *testing.T, c *TestingConn) { func TestTwoUsers(t *testing.T) { logSink := make(chan LogEvent, 8) stateSink := make(chan StateEvent, 8) - daemon := NewDaemon("ver1", "foohost", "", logSink, stateSink) + host := "foohost" + daemon := NewDaemon("ver1", &host, nil, nil, logSink, stateSink) events := make(chan ClientEvent) go daemon.Processor(events) conn1 := NewTestingConn() conn2 := NewTestingConn() - client1 := NewClient("foohost", conn1) - client2 := NewClient("foohost", conn2) + client1 := NewClient(&host, conn1) + client2 := NewClient(&host, conn2) go client1.Processor(events) go client2.Processor(events) @@ -100,11 +101,12 @@ func TestTwoUsers(t *testing.T) { func TestJoin(t *testing.T) { logSink := make(chan LogEvent, 8) stateSink := make(chan StateEvent, 8) - daemon := NewDaemon("ver1", "foohost", "", logSink, stateSink) + host := "foohost" + daemon := NewDaemon("ver1", &host, nil, nil, logSink, stateSink) events := make(chan ClientEvent) go daemon.Processor(events) conn := NewTestingConn() - client := NewClient("foohost", conn) + client := NewClient(&host, conn) go client.Processor(events) conn.inbound <- "NICK nick2\r\nUSER foo2 bar2 baz2 :Long name2\r\n"