merge: catch up with feature/helcim-plan-consolidation base
# Conflicts: # server/api/auth/member.get.js # server/api/members/update-contribution.post.js # tests/server/api/update-contribution.test.js
This commit is contained in:
commit
7704557f16
10 changed files with 160 additions and 9 deletions
|
|
@ -327,12 +327,15 @@ describe('update-contribution endpoint — Case 2 (paid→free)', () => {
|
|||
expect(cancelHelcimSubscription).toHaveBeenCalledWith('sub-1')
|
||||
expect(Member.findByIdAndUpdate).toHaveBeenCalledWith(
|
||||
'member-c2',
|
||||
{ $set: expect.objectContaining({
|
||||
expect.objectContaining({
|
||||
$set: expect.objectContaining({
|
||||
contributionAmount: 0,
|
||||
helcimSubscriptionId: null,
|
||||
paymentMethod: 'none',
|
||||
billingCadence: 'monthly',
|
||||
}) },
|
||||
}),
|
||||
$unset: expect.objectContaining({ nextBillingDate: 1 }),
|
||||
}),
|
||||
{ runValidators: false }
|
||||
)
|
||||
expect(result.success).toBe(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue