Merge pull request #27643 from overleaf/rh-pause-cancel

Terminate Recurly subscription when cancelling during final month of pause

GitOrigin-RevId: 39e4c9534621f57b3e2783599ebe521959d7401f
This commit is contained in:
roo hutton
2025-08-29 08:06:17 +00:00
committed by Copybot
parent 3279f997bb
commit 467102fd1b
5 changed files with 61 additions and 66 deletions
@@ -516,35 +516,6 @@ describe('<ActiveSubscription />', function () {
})
})
describe('contact support for paused subscription with 0 remaining cycles', function () {
beforeEach(function () {
this.locationWrapperSandbox = sinon.createSandbox()
this.locationWrapperStub = this.locationWrapperSandbox.stub(location)
})
afterEach(function () {
this.locationWrapperSandbox.restore()
})
it('redirects to contact page when cancel button clicked', function () {
const pausedSubscription = cloneDeep(annualActiveSubscription)
pausedSubscription.payment.state = 'paused'
pausedSubscription.payment.remainingPauseCycles = 0
renderActiveSubscription(pausedSubscription)
const button = screen.getByRole('button', {
name: 'Cancel your subscription',
})
fireEvent.click(button)
expect(sendMBSpy).to.be.calledOnceWith(
'subscription-page-cancel-button-click'
)
expect(this.locationWrapperStub.assign).to.be.calledOnceWith('/contact')
})
})
describe('group plans', function () {
it('does not show "Change plan" option for group plans', function () {
renderActiveSubscription(groupActiveSubscription)