mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
fix issue in unit testing case for package ghttp
This commit is contained in:
@ -183,8 +183,8 @@ func Test_Params_Struct(t *testing.T) {
|
||||
t.Assert(client.PostContent("/struct1", `id=1&name=john&password1=123&password2=456`), `1john123456`)
|
||||
t.Assert(client.PostContent("/struct2", `id=1&name=john&password1=123&password2=456`), `1john123456`)
|
||||
t.Assert(client.PostContent("/struct2", ``), ``)
|
||||
t.Assert(client.PostContent("/struct-valid", `id=1&name=john&password1=123&password2=0`), `The value length must be between 2 and 20; 密码强度不足`)
|
||||
t.Assert(client.PostContent("/parse", `id=1&name=john&password1=123&password2=0`), `The value length must be between 2 and 20; 密码强度不足`)
|
||||
t.Assert(client.PostContent("/struct-valid", `id=1&name=john&password1=123&password2=0`), `The passwd1 value length must be between 2 and 20; 密码强度不足`)
|
||||
t.Assert(client.PostContent("/parse", `id=1&name=john&password1=123&password2=0`), `The passwd1 value length must be between 2 and 20; 密码强度不足`)
|
||||
t.Assert(client.GetContent("/parse", `id=1&name=john&password1=123&password2=456`), `密码强度不足`)
|
||||
t.Assert(client.GetContent("/parse", `id=1&name=john&password1=123Abc!@#&password2=123Abc!@#`), `1john123Abc!@#123Abc!@#`)
|
||||
t.Assert(client.PostContent("/parse", `{"id":1,"name":"john","password1":"123Abc!@#","password2":"123Abc!@#"}`), `1john123Abc!@#123Abc!@#`)
|
||||
|
||||
Reference in New Issue
Block a user