diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-12-28 18:09:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-28 10:09:57 +0000 |
commit | e743570f65b533552337d9606ac1d906ec054127 (patch) | |
tree | 55042505c0618b567e7f30e7334ec6d66db86230 /tests/integration | |
parent | f3999888c0b765380003f814f9c3d5cf80128167 (diff) | |
download | gitea-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.go | 4 |
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) |