输出消息改为中文

This commit is contained in:
2025-09-12 14:54:07 +08:00
parent 588c819c3c
commit 41bbe69442
7 changed files with 55 additions and 55 deletions

View File

@@ -182,7 +182,7 @@ func TestCreateUser(t *testing.T) {
// 初始化 Gin 上下文和记录器
w := httptest.NewRecorder()
ctx, _ := gin.CreateTestContext(w)
ctx.Request = httptest.NewRequest(http.MethodPost, "/users", nil) // 初始请求,后续会替换 Body
ctx.Request = httptest.NewRequest(http.MethodPost, "/users", nil) // URL 路径不重要,因为我们不测试路由
// 设置请求体
jsonBody, _ := json.Marshal(tt.requestBody)