diff --git a/net/ghttp/ghttp_z_unit_feature_request_json_test.go b/net/ghttp/ghttp_z_unit_feature_request_json_test.go index 78b77a80f..2ccbf81e4 100644 --- a/net/ghttp/ghttp_z_unit_feature_request_json_test.go +++ b/net/ghttp/ghttp_z_unit_feature_request_json_test.go @@ -58,7 +58,7 @@ func Test_Params_Json_Request(t *testing.T) { t.Assert(client.GetContent(ctx, "/get", `{"id":1,"name":"john","password1":"123Abc!@#","password2":"123Abc!@#"}`), ``) t.Assert(client.GetContent(ctx, "/map", `{"id":1,"name":"john","password1":"123Abc!@#","password2":"123Abc!@#"}`), ``) t.Assert(client.PostContent(ctx, "/parse", `{"id":1,"name":"john","password1":"123Abc!@#","password2":"123Abc!@#"}`), `1john123Abc!@#123Abc!@#`) - t.Assert(client.PostContent(ctx, "/parse", `{"id":1,"name":"john","password1":"123Abc!@#","password2":"123"}`), `密码强度不足; 两次密码不一致`) + t.Assert(client.PostContent(ctx, "/parse", `{"id":1,"name":"john","password1":"123Abc!@#","password2":"123"}`), `密码强度不足`) }) } diff --git a/net/ghttp/ghttp_z_unit_feature_request_struct_test.go b/net/ghttp/ghttp_z_unit_feature_request_struct_test.go index 45673c7f8..dc476c664 100644 --- a/net/ghttp/ghttp_z_unit_feature_request_struct_test.go +++ b/net/ghttp/ghttp_z_unit_feature_request_struct_test.go @@ -453,7 +453,7 @@ func Test_Params_Struct(t *testing.T) { t.Assert(client.PostContent(ctx, "/struct2", `id=1&name=john&password1=123&password2=456`), `1john123456`) t.Assert(client.PostContent(ctx, "/struct2", ``), ``) t.Assert(client.PostContent(ctx, "/struct-valid", `id=1&name=john&password1=123&password2=0`), "The password2 value `0` length must be between 2 and 20; 密码强度不足") - t.Assert(client.PostContent(ctx, "/parse", `id=1&name=john&password1=123&password2=0`), "The password2 value `0` length must be between 2 and 20; 密码强度不足") + t.Assert(client.PostContent(ctx, "/parse", `id=1&name=john&password1=123&password2=0`), "The password2 value `0` length must be between 2 and 20") t.Assert(client.PostContent(ctx, "/parse", `{"id":1,"name":"john","password1":"123Abc!@#","password2":"123Abc!@#"}`), `1john123Abc!@#123Abc!@#`) }) } diff --git a/net/ghttp/ghttp_z_unit_feature_request_test.go b/net/ghttp/ghttp_z_unit_feature_request_test.go index 23f1dc4cc..2c8646117 100644 --- a/net/ghttp/ghttp_z_unit_feature_request_test.go +++ b/net/ghttp/ghttp_z_unit_feature_request_test.go @@ -564,8 +564,8 @@ func Test_Params_Parse_Validation(t *testing.T) { client := g.Client() client.SetPrefix(prefix) - t.Assert(client.GetContent(ctx, "/parse"), `请输入账号; 账号长度为6到30位; 请输入密码; 密码长度不够; 请确认密码; 密码长度不够; 两次密码不一致`) - t.Assert(client.GetContent(ctx, "/parse?name=john11&password1=123456&password2=123"), `密码长度不够; 两次密码不一致`) + t.Assert(client.GetContent(ctx, "/parse"), `请输入账号`) + t.Assert(client.GetContent(ctx, "/parse?name=john11&password1=123456&password2=123"), `密码长度不够`) t.Assert(client.GetContent(ctx, "/parse?name=john&password1=123456&password2=123456"), `账号长度为6到30位`) t.Assert(client.GetContent(ctx, "/parse?name=john11&password1=123456&password2=123456"), `ok`) }) diff --git a/net/ghttp/ghttp_z_unit_feature_request_xml_test.go b/net/ghttp/ghttp_z_unit_feature_request_xml_test.go index cdb3e72f7..c0ac37e2e 100644 --- a/net/ghttp/ghttp_z_unit_feature_request_xml_test.go +++ b/net/ghttp/ghttp_z_unit_feature_request_xml_test.go @@ -61,6 +61,6 @@ func Test_Params_Xml_Request(t *testing.T) { t.Assert(client.GetContent(ctx, "/map", content1), ``) t.Assert(client.PostContent(ctx, "/map", content1), `1john123Abc!@#123Abc!@#`) t.Assert(client.PostContent(ctx, "/parse", content1), `1john123Abc!@#123Abc!@#`) - t.Assert(client.PostContent(ctx, "/parse", content2), `密码强度不足; 两次密码不一致`) + t.Assert(client.PostContent(ctx, "/parse", content2), `密码强度不足`) }) }