Skip to content

Commit

Permalink
Fix heatmap test (go-gitea#17381) (go-gitea#17383)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored Oct 21, 2021
1 parent 3baeec7 commit a87b813
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integrations/api_user_heatmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)
Expand Down

0 comments on commit a87b813

Please sign in to comment.