mirror of
https://git.fightbot.fun/hxuanyu/BingPaper.git
synced 2026-02-15 05:59:32 +08:00
修复单元测试,调整 handleImageResponse 调用参数数量
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user