Browse Source

All test case use SetupConfig (which is hardcode value)

master
Patrick Peng Sun 8 years ago
parent
commit
ca20ae8800
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      accessToken_test.go
  2. +4
    -0
      common_test.go

+ 1
- 1
accessToken_test.go View File



//get accesstoken from wechat server or local cache file //get accesstoken from wechat server or local cache file
func TestAccessToken(t *testing.T) { func TestAccessToken(t *testing.T) {
readConfig()
SetupConfig()
token, err := GetAccessToken() token, err := GetAccessToken()
if err != nil { if err != nil {
t.Error("Cannot get AccessToken From Tencent Wechat Server") t.Error("Cannot get AccessToken From Tencent Wechat Server")

+ 4
- 0
common_test.go View File

"/tmp/wechat_hitxy_access_token", "/tmp/wechat_hitxy_access_token",
"gh_f09231355c68"} "gh_f09231355c68"}


CRMConfig = EspoCRMAPIConfig{
"https://c.hitxy.org.au/",
"wechat",
"crmwechat.api"}
} }


func AssertEqual(t *testing.T, a interface{}, b interface{}, message string) { func AssertEqual(t *testing.T, a interface{}, b interface{}, message string) {

Loading…
Cancel
Save