Skip to content

Commit

Permalink
test(time-zone): use UTC for time zone in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor-boros committed Oct 8, 2021
1 parent 05db753 commit 145031e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions internal/pkg/client/clockify/clockify_test.go
Expand Up @@ -58,8 +58,8 @@ func newMockServer(t *testing.T, opts *mockServerOpts) *httptest.Server {
}

func TestClockifyClient_FetchEntries(t *testing.T) {
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.Local)
end := time.Date(2021, 10, 2, 23, 59, 59, 0, time.Local)
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.UTC)
end := time.Date(2021, 10, 2, 23, 59, 59, 0, time.UTC)
remainingCalls := 1

expectedEntries := []worklog.Entry{
Expand Down Expand Up @@ -208,8 +208,8 @@ func TestClockifyClient_FetchEntries(t *testing.T) {
}

func TestClockifyClient_FetchEntries_TasksAsTags(t *testing.T) {
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.Local)
end := time.Date(2021, 10, 2, 23, 59, 59, 0, time.Local)
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.UTC)
end := time.Date(2021, 10, 2, 23, 59, 59, 0, time.UTC)
remainingCalls := 1

expectedEntries := []worklog.Entry{
Expand Down
10 changes: 5 additions & 5 deletions internal/pkg/client/tempo/tempo_test.go
Expand Up @@ -103,8 +103,8 @@ func newMockServer(t *testing.T, opts *mockServerOpts) *httptest.Server {
}

func TestTempoClient_FetchEntries(t *testing.T) {
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.Local)
end := time.Date(2021, 10, 2, 23, 59, 59, 0, time.Local)
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.UTC)
end := time.Date(2021, 10, 2, 23, 59, 59, 0, time.UTC)

clientUsername := "Thor"
clientPassword := "The strongest Avenger"
Expand Down Expand Up @@ -257,7 +257,7 @@ func TestTempoClient_FetchEntries(t *testing.T) {
}

func TestTempoClient_UploadEntries(t *testing.T) {
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.Local)
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.UTC)

clientUsername := "Thor"
clientPassword := "The strongest Avenger"
Expand Down Expand Up @@ -349,7 +349,7 @@ func TestTempoClient_UploadEntries(t *testing.T) {
}

func TestTempoClient_UploadEntries_TreatDurationAsBilled(t *testing.T) {
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.Local)
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.UTC)

clientUsername := "Thor"
clientPassword := "The strongest Avenger"
Expand Down Expand Up @@ -442,7 +442,7 @@ func TestTempoClient_UploadEntries_TreatDurationAsBilled(t *testing.T) {
}

func TestTempoClient_UploadEntries_RoundToClosestMinute(t *testing.T) {
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.Local)
start := time.Date(2021, 10, 2, 0, 0, 0, 0, time.UTC)

clientUsername := "Thor"
clientPassword := "The strongest Avenger"
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/worklog/entry_test.go
Expand Up @@ -9,7 +9,7 @@ import (
)

func getTestEntry() worklog.Entry {
start := time.Date(2021, 10, 2, 5, 0, 0, 0, time.Local)
start := time.Date(2021, 10, 2, 5, 0, 0, 0, time.UTC)
end := start.Add(time.Hour * 2)

return worklog.Entry{
Expand Down

0 comments on commit 145031e

Please sign in to comment.