Merge branch 'master' into 2594-filter-query-all-contributions

This commit is contained in:
Hannes Heine 2023-01-31 16:18:44 +01:00 committed by GitHub
commit a336657ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ describe('util/creation', () => {
amount: 160.0,
memo: 'Admin contribution for the last month',
creationDate: contributionDateFormatter(
new Date(now.getFullYear(), now.getMonth() - 1, now.getDate()),
new Date(now.getFullYear(), now.getMonth() - 1, 1),
),
},
})
@ -73,7 +73,7 @@ describe('util/creation', () => {
amount: 450.0,
memo: 'Admin contribution for two months ago',
creationDate: contributionDateFormatter(
new Date(now.getFullYear(), now.getMonth() - 2, now.getDate()),
new Date(now.getFullYear(), now.getMonth() - 2, 1),
),
},
})
@ -95,7 +95,7 @@ describe('util/creation', () => {
amount: 500.0,
memo: 'Contribution for the last month',
creationDate: contributionDateFormatter(
new Date(now.getFullYear(), now.getMonth() - 1, now.getDate()),
new Date(now.getFullYear(), now.getMonth() - 1, 1),
),
},
})
@ -114,9 +114,7 @@ describe('util/creation', () => {
}),
expect.objectContaining({
userId: user.id,
contributionDate: setZeroHours(
new Date(now.getFullYear(), now.getMonth() - 1, now.getDate()),
),
contributionDate: setZeroHours(new Date(now.getFullYear(), now.getMonth() - 1, 1)),
amount: expect.decimalEqual(160),
memo: 'Admin contribution for the last month',
moderatorId: admin.id,
@ -125,9 +123,7 @@ describe('util/creation', () => {
}),
expect.objectContaining({
userId: user.id,
contributionDate: setZeroHours(
new Date(now.getFullYear(), now.getMonth() - 2, now.getDate()),
),
contributionDate: setZeroHours(new Date(now.getFullYear(), now.getMonth() - 2, 1)),
amount: expect.decimalEqual(450),
memo: 'Admin contribution for two months ago',
moderatorId: admin.id,
@ -145,9 +141,7 @@ describe('util/creation', () => {
}),
expect.objectContaining({
userId: user.id,
contributionDate: setZeroHours(
new Date(now.getFullYear(), now.getMonth() - 1, now.getDate()),
),
contributionDate: setZeroHours(new Date(now.getFullYear(), now.getMonth() - 1, 1)),
amount: expect.decimalEqual(500),
memo: 'Contribution for the last month',
moderatorId: null,