Skip to content

Commit ead489e

Browse files
committed
updated date.WithDuration
1 parent bc2d4cf commit ead489e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/github/contributions_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,9 @@ func TestGithubService_GetCurrentContributionStreakByUsername(t *testing.T) {
347347
ctx,
348348
mock.AnythingOfType("*github.contributionsQuery"),
349349
mock.MatchedBy(func(params map[string]interface{}) bool {
350-
assert.WithinDuration(from, params["from"].(githubv4.DateTime).Time, time.Millisecond)
351-
assert.WithinDuration(to, params["to"].(githubv4.DateTime).Time, time.Millisecond)
352-
return githubv4.String(username) == params["username"]
350+
return date.WithinDuration(from, params["from"].(githubv4.DateTime).Time, time.Millisecond) &&
351+
date.WithinDuration(to, params["to"].(githubv4.DateTime).Time, time.Millisecond) &&
352+
githubv4.String(username) == params["username"]
353353
}),
354354
).Return(nil).Run(func(args mock.Arguments) {
355355
a := args.Get(1).(*contributionsQuery)

0 commit comments

Comments
 (0)