Skip to content

Commit 8973e90

Browse files
authored
Merge branch 'main' into bugfix/svg_side_by_side_comparison
2 parents 208975e + 5879ab8 commit 8973e90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

integrations/api_user_heatmap_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import (
88
"fmt"
99
"net/http"
1010
"testing"
11+
"time"
1112

1213
"code.gitea.io/gitea/models"
14+
"code.gitea.io/gitea/modules/timeutil"
1315

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

25+
var fakeNow = time.Date(2011, 10, 20, 0, 0, 0, 0, time.Local)
26+
timeutil.Set(fakeNow)
27+
defer timeutil.Unset()
28+
2329
urlStr := fmt.Sprintf("/api/v1/users/%s/heatmap", normalUsername)
2430
req := NewRequest(t, "GET", urlStr)
2531
resp := session.MakeRequest(t, req, http.StatusOK)

0 commit comments

Comments
 (0)