瀏覽代碼

Fix heatmap test (#17381)

tags/v1.16.0-rc1
Lunny Xiao 2 年之前
父節點
當前提交
5879ab83b5
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. 6
    0
      integrations/api_user_heatmap_test.go

+ 6
- 0
integrations/api_user_heatmap_test.go 查看文件

@@ -8,8 +8,10 @@ import (
"fmt"
"net/http"
"testing"
"time"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/timeutil"

"github.com/stretchr/testify/assert"
)
@@ -20,6 +22,10 @@ func TestUserHeatmap(t *testing.T) {
normalUsername := "user2"
session := loginUser(t, adminUsername)

var fakeNow = time.Date(2011, 10, 20, 0, 0, 0, 0, time.Local)
timeutil.Set(fakeNow)
defer timeutil.Unset()

urlStr := fmt.Sprintf("/api/v1/users/%s/heatmap", normalUsername)
req := NewRequest(t, "GET", urlStr)
resp := session.MakeRequest(t, req, http.StatusOK)

Loading…
取消
儲存