From eed2c8ee17619761b3c4f5bbc8840b1886a3901b Mon Sep 17 00:00:00 2001
From: Will Hunt <half-shot@molrams.com>
Date: Wed, 22 Feb 2017 03:23:12 +0000
Subject: [PATCH] Update tests

---
 test/test_discordbot.ts | 34 +++++-----------------------------
 1 file changed, 5 insertions(+), 29 deletions(-)

diff --git a/test/test_discordbot.ts b/test/test_discordbot.ts
index 40914bc..46345db 100644
--- a/test/test_discordbot.ts
+++ b/test/test_discordbot.ts
@@ -121,39 +121,15 @@ describe("DiscordBot", () => {
     );
     discordBot.run();
     it("should reject a missing guild.", () => {
-      return assert.isRejected(discordBot.LookupRoom("MyMissingGuild", "achannel"));
-    });
-
-    it("should resolve a guild.", () => {
-      return assert.isFulfilled(discordBot.LookupRoom("MyGuild", "achannel"));
-    });
-
-    it("should resolve a guild with an id.", () => {
-      return assert.isFulfilled(discordBot.LookupRoom("123", "achannel"));
-    });
-
-    it("should resolve a guild with spaces.", () => {
-      return assert.isFulfilled(discordBot.LookupRoom("My-Spaces-Guild", "achannel"));
-    });
-
-    it("should resolve a guild with dashes.", () => {
-      return assert.isFulfilled(discordBot.LookupRoom("My-Dash-Guild", "achannel"));
+      return assert.isRejected(discordBot.LookupRoom("541", "321"));
     });
 
     it("should reject a missing channel.", () => {
-      return assert.isRejected(discordBot.LookupRoom("MyGuild", "amissingchannel"));
-    });
-
-    it("should resolve a channel with spaces.", () => {
-      return assert.isFulfilled(discordBot.LookupRoom("MyGuild", "a channel"));
+      return assert.isRejected(discordBot.LookupRoom("123", "666"));
     });
 
-    it("should resolve a channel with dashes.", () => {
-      return assert.isFulfilled(discordBot.LookupRoom("MyGuild", "a-channel"));
-    });
-
-    it("should resolve a channel with an id.", () => {
-      return assert.isFulfilled(discordBot.LookupRoom("MyGuild", "321"));
+    it("should resolve a guild and channel id.", () => {
+      return assert.isFulfilled(discordBot.LookupRoom("123", "321"));
     });
   });
   // describe("ProcessMatrixMsgEvent()", () => {
@@ -171,8 +147,8 @@ describe("DiscordBot", () => {
   describe("OnTyping()", () => {
     const discordBot = new modDiscordBot.DiscordBot(
       config,
-      mockBridge,
     );
+    discordBot.setBridge(mockBridge);
     discordBot.run();
     it("should reject an unknown room.", () => {
       return assert.isRejected(discordBot.OnTyping( {id: "512"}, {id: "12345"}, true));
-- 
GitLab