From 256027bece912fefd7e27c954936e2fb37a6b80d Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 25 Mar 2014 22:24:04 +0100 Subject: Expanded TestJoin --- chat/chat_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chat/chat_test.go b/chat/chat_test.go index b695b44..bd4d1cb 100644 --- a/chat/chat_test.go +++ b/chat/chat_test.go @@ -28,6 +28,15 @@ func TestJoining(t *testing.T) { t.Error("r1 and r2 are not equal") } + buddies := r1.ListBuddies() + seen := make(map[string]bool) + for _, b := range buddies { + seen[b] = true + } + if !seen["Foo"] || !seen["Bar"] { + t.Error("Foo or Bar missing in buddy list") + } + if _, _, err = Join("test", "Baz"); err != RoomIsFull { t.Fatalf("Got error \"%s\", expected \"%s\"", err, RoomIsFull) } -- cgit v1.2.3-70-g09d2