Skip to content

Commit

Permalink
Use local timezone to compare
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Feb 25, 2020
1 parent 6baa07d commit 21f2cb7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integrations/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,19 @@ func testViewRepo(t *testing.T) {
items = append(items, f)
})

commitT := time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).In(time.Local).Format(time.RFC1123)
assert.EqualValues(t, []file{
{
fileName: "doc",
commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6",
commitMsg: "init project",
commitTime: time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).Format(time.RFC1123),
commitTime: commitT,
},
{
fileName: "README.md",
commitID: "2a47ca4b614a9f5a43abbd5ad851a54a616ffee6",
commitMsg: "init project",
commitTime: time.Date(2017, time.June, 14, 13, 54, 21, 0, time.UTC).Format(time.RFC1123),
commitTime: commitT,
},
}, items)
}
Expand Down

0 comments on commit 21f2cb7

Please sign in to comment.