修复单元测试,调整 handleImageResponse 调用参数数量

This commit is contained in:
2026-01-27 20:54:27 +08:00
parent ae82557545
commit 3c1f29e4ef

View File

@@ -38,7 +38,7 @@ func TestHandleImageResponseRedirect(t *testing.T) {
c, _ := gin.CreateTestContext(w)
c.Request, _ = http.NewRequest("GET", "/api/v1/image/today?variant=UHD", nil)
handleImageResponse(c, img)
handleImageResponse(c, img, 0)
assert.Equal(t, http.StatusFound, w.Code)
assert.Contains(t, w.Header().Get("Location"), "bing.com")