"fmt"
"net/http"
"testing"
+ "time"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/modules/timeutil"
"github.com/stretchr/testify/assert"
)
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)