+ sns_test.go

This commit is contained in:
gazebo
2019-02-27 16:26:49 +08:00
parent ff06369a23
commit 735bada5df
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package weixinapi
import "testing"
func TestSNSRetrieveToken(t *testing.T) {
result, err := weixinapi.SNSRetrieveToken("061lxVZh0gye0x1fNrZh0imd0i0lxVZS")
if err != nil {
t.Fatal(err.Error())
}
sugarLogger.Debug(result)
}

View File

@@ -21,6 +21,9 @@ func init() {
// sandbox
weixinapi = New("wxbf235770edaabc5c", "ba32b269a068a5b72486a0beafd171e8")
// prod
// weixinapi = New("wx2bb99eb5d2c9b82c", "6bbbed1443cc062c20a015a64c07a531")
}
func handleError(t *testing.T, err error) {