summaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-12-28 18:09:57 +0800
committerGitHub <noreply@github.com>2023-12-28 10:09:57 +0000
commite743570f65b533552337d9606ac1d906ec054127 (patch)
tree55042505c0618b567e7f30e7334ec6d66db86230 /tests/integration
parentf3999888c0b765380003f814f9c3d5cf80128167 (diff)
downloadgitea-e743570f65b533552337d9606ac1d906ec054127.tar.gz
gitea-e743570f65b533552337d9606ac1d906ec054127.zip
Refactor timeutil package (#28623)
1. make names more readable 2. remove unused FormatLong/FormatShort 3. use `FormatDate` instead of `Format "2006-01-02"`
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/api_user_heatmap_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/api_user_heatmap_test.go b/tests/integration/api_user_heatmap_test.go
index a49bdd0c25..a23536735b 100644
--- a/tests/integration/api_user_heatmap_test.go
+++ b/tests/integration/api_user_heatmap_test.go
@@ -24,8 +24,8 @@ func TestUserHeatmap(t *testing.T) {
token := getUserToken(t, adminUsername, auth_model.AccessTokenScopeReadUser)
fakeNow := time.Date(2011, 10, 20, 0, 0, 0, 0, time.Local)
- timeutil.Set(fakeNow)
- defer timeutil.Unset()
+ timeutil.MockSet(fakeNow)
+ defer timeutil.MockUnset()
req := NewRequest(t, "GET", fmt.Sprintf("/api/v1/users/%s/heatmap", normalUsername)).
AddTokenAuth(token)