Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boreq committed Dec 13, 2023
1 parent e49923f commit 9241d7b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions service/domain/downloader/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ func date(year int, month time.Month, day, hour, min, sec int) time.Time {

func assertEqualWindows(tb require.TestingT, a, b []downloader.TimeWindow) {
assert.Equal(tb, len(a), len(b))
for i := 0; i < len(a); i++ {
assert.True(tb, a[i].Start().Equal(b[i].Start()))
assert.True(tb, a[i].End().Equal(b[i].End()))
if len(a) == len(b) {
for i := 0; i < len(a); i++ {
assert.True(tb, a[i].Start().Equal(b[i].Start()))
assert.True(tb, a[i].End().Equal(b[i].End()))
}
}
}

Expand Down

0 comments on commit 9241d7b

Please sign in to comment.