From ca20ae8800c2af09ea2a0bc818904051ba4c80d3 Mon Sep 17 00:00:00 2001 From: Patrick Peng Sun Date: Fri, 19 May 2017 22:33:56 +1000 Subject: [PATCH] All test case use SetupConfig (which is hardcode value) --- accessToken_test.go | 2 +- common_test.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/accessToken_test.go b/accessToken_test.go index 8fda2a7..9e29585 100644 --- a/accessToken_test.go +++ b/accessToken_test.go @@ -9,7 +9,7 @@ import ( //get accesstoken from wechat server or local cache file func TestAccessToken(t *testing.T) { - readConfig() + SetupConfig() token, err := GetAccessToken() if err != nil { t.Error("Cannot get AccessToken From Tencent Wechat Server") diff --git a/common_test.go b/common_test.go index df85f42..b8b60f2 100644 --- a/common_test.go +++ b/common_test.go @@ -15,6 +15,10 @@ func SetupConfig() { "/tmp/wechat_hitxy_access_token", "gh_f09231355c68"} + CRMConfig = EspoCRMAPIConfig{ + "https://c.hitxy.org.au/", + "wechat", + "crmwechat.api"} } func AssertEqual(t *testing.T, a interface{}, b interface{}, message string) {