Browse Source

Testing Close(), store token from Email/Pass New if ran.

Bruce Marriner 9 years ago
parent
commit
367594be1f
1 changed files with 6 additions and 1 deletions
  1. 6 1
      discord_test.go

+ 6 - 1
discord_test.go

@@ -136,8 +136,13 @@ func TestNewUserPass(t *testing.T) {
 
 	t.Log("Successfully connected to Discord via New(user,pass).")
 	dg = d
+	if envToken == "" {
+		envToken = dg.Token
+	}
+}
 
-	// Not testing yet.
+func TestClose(t *testing.T) {
+	dg.Close()
 }
 
 // TestNewToken tests the New() function with a Token.  This should return