Skip to content

Commit ebacfe1

Browse files
committed
improve comment about assert equality
1 parent 397cc7a commit ebacfe1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

coderd/insights_internal_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ func Test_parseInsightsStartAndEndTime(t *testing.T) {
133133
rw := httptest.NewRecorder()
134134
gotStartTime, gotEndTime, gotOk := parseInsightsStartAndEndTime(context.Background(), rw, tt.args.startTime, tt.args.endTime)
135135

136-
// assert.Equal is unable to test location equality, so we
137-
// use assert.WithinDuration.
136+
// assert.Equal is unable to test time equality with different
137+
// (but same) locations because the *time.Location names differ
138+
// between LoadLocation and Parse, so we use assert.WithinDuration.
138139
if !assert.Equal(t, tt.wantOk, gotOk) {
139140
//nolint:bodyclose
140141
t.Log("Status: ", rw.Result().StatusCode)

0 commit comments

Comments
 (0)