Refactor timeutil package (#28623)
1. make names more readable 2. remove unused FormatLong/FormatShort 3. use `FormatDate` instead of `Format "2006-01-02"`
This commit is contained in:
parent
f3999888c0
commit
e743570f65
9 changed files with 30 additions and 39 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue