Add test to ensure GetNextTrueUpREviewDueDate will return a year in the future if necessary.

Этот коммит содержится в:
Conor Macpherson
2022-12-27 16:59:16 -05:00
родитель 9c71784d0d
Коммит 7048d83ca5

Просмотреть файл

@@ -146,4 +146,11 @@ func TestGetNextTrueUpReviewDueDate(t *testing.T) {
due = GetNextTrueUpReviewDueDate(now)
assert.Equal(t, time.December, due.Month())
})
t.Run("Due date will be in the next year if the next quarter is not within the current year", func(t *testing.T) {
now := time.Date(2022, time.December, 18, 0, 0, 0, 0, time.Local)
due := GetNextTrueUpReviewDueDate(now)
assert.Equal(t, time.March, due.Month())
assert.Equal(t, 2023, due.Year())
})
}