1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 21:02:25 +08:00
Files
wechat/util/query_test.go
2024-07-19 11:26:06 +08:00

20 lines
397 B
Go

package util
import (
"testing"
)
// TestQuery query method test case
func TestQuery(t *testing.T) {
result := Query(map[string]interface{}{
"age": 12,
"name": "Alan",
"cat": "Peter",
})
if result == "" {
// 由于 hash 是乱序 所以没法很好的预测输出的字符串
// 将会输出符合 Query 规则的字符串 "age=12&name=Alan&cat=Peter"
t.Error("NOT PASS")
}
}