From e743570f65b533552337d9606ac1d906ec054127 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 28 Dec 2023 18:09:57 +0800 Subject: Refactor timeutil package (#28623) 1. make names more readable 2. remove unused FormatLong/FormatShort 3. use `FormatDate` instead of `Format "2006-01-02"` --- tests/integration/api_user_heatmap_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/integration') 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) -- cgit v1.2.3