mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #24833 from overleaf/kh-add-stripe-get-subscription
[web] fetch Stripe subscription GitOrigin-RevId: bffc31224aece584f4f1e3294bb1285d17f99195
This commit is contained in:
@@ -25,6 +25,7 @@ class PromisifiedSubscription {
|
||||
this.ssoConfig = options.ssoConfig
|
||||
this.groupPolicy = options.groupPolicy
|
||||
this.addOns = options.addOns
|
||||
this.paymentProvider = options.paymentProvider
|
||||
}
|
||||
|
||||
async ensureExists() {
|
||||
|
||||
@@ -114,6 +114,22 @@ describe('PlansLocator', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('mapStripeLookupKeyToRecurlyPlanCode', function () {
|
||||
it('should return the recurly plan code for existing plans', function () {
|
||||
const planCode = 'standard_monthly'
|
||||
const lookupKey =
|
||||
this.PlansLocator.mapStripeLookupKeyToRecurlyPlanCode(planCode)
|
||||
expect(lookupKey).to.equal('collaborator')
|
||||
})
|
||||
|
||||
it('should return undefined for unknown plans', function () {
|
||||
const planCode = 'foobar'
|
||||
const lookupKey =
|
||||
this.PlansLocator.mapStripeLookupKeyToRecurlyPlanCode(planCode)
|
||||
expect(lookupKey).to.equal(undefined)
|
||||
})
|
||||
})
|
||||
|
||||
describe('getPlanTypeAndPeriodFromRecurlyPlanCode', function () {
|
||||
it('should return the plan type and period for "collaborator"', function () {
|
||||
const { planType, period } =
|
||||
|
||||
Reference in New Issue
Block a user