test(passport): 更新客户端测试用例和找回密码接口
- 修改了 ChangePassword 请求的密码参数 - 优化了测试用例的断言和日志输出
This commit is contained in:
parent
07bdfcb7b3
commit
c81fa6be2c
@ -85,12 +85,12 @@ func TestChangePassword(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
req := CreateChangePasswordRequest("rz35990497", "654321")
|
req := CreateChangePasswordRequest("rz35990497", "7654321")
|
||||||
req.AcceptFormat = "text"
|
|
||||||
resp, err := client.ChangePassword(req)
|
resp, err := client.ChangePassword(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
// 记录文本结果
|
// 记录文本结果
|
||||||
t.Logf("resp data:%+v", resp.GetHttpContentString())
|
t.Logf("resp code:%+v, msg:%s", resp.Code, resp.Msg)
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ func CreateChangePasswordRequest(userName string, newPwd string) (req *ChangePas
|
|||||||
"newpwd": newPwd,
|
"newpwd": newPwd,
|
||||||
"time": fmt.Sprintf("%v", ts),
|
"time": fmt.Sprintf("%v", ts),
|
||||||
"sign": sign,
|
"sign": sign,
|
||||||
|
"format": "json",
|
||||||
}
|
}
|
||||||
|
|
||||||
req.Method = requests.POST
|
req.Method = requests.POST
|
||||||
|
Loading…
Reference in New Issue
Block a user