소스 검색

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

Bruce Marriner 9 년 전
부모
커밋
367594be1f
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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