summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-03-25 22:24:04 +0100
committerKevin Chabowski <kevin@kch42.de>2014-03-25 22:24:04 +0100
commit256027bece912fefd7e27c954936e2fb37a6b80d (patch)
treeb38d30d05712310da1c5cb3ad130ac93fec4b2a2
parentb21f8996143c8404b17aecceb2b7b1c7d270e53b (diff)
downloadsimplechat-256027bece912fefd7e27c954936e2fb37a6b80d.tar.gz
simplechat-256027bece912fefd7e27c954936e2fb37a6b80d.tar.bz2
simplechat-256027bece912fefd7e27c954936e2fb37a6b80d.zip
Expanded TestJoin
-rw-r--r--chat/chat_test.go9
1 files changed, 9 insertions, 0 deletions
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)
}