rename price attributes to price_in_cents or price_in_unit
GitOrigin-RevId: 8045472c96862078583fcb522099ad78926281dc
This commit is contained in:
@@ -6,21 +6,21 @@ const plans = [
|
||||
{
|
||||
planCode: 'first',
|
||||
name: '1st',
|
||||
price: 800,
|
||||
price_in_cents: 800,
|
||||
features: {},
|
||||
featureDescription: {},
|
||||
},
|
||||
{
|
||||
planCode: 'second',
|
||||
name: '2nd',
|
||||
price: 1500,
|
||||
price_in_cents: 1500,
|
||||
features: {},
|
||||
featureDescription: {},
|
||||
},
|
||||
{
|
||||
planCode: 'third',
|
||||
name: '3rd',
|
||||
price: 3000,
|
||||
price_in_cents: 3000,
|
||||
features: {},
|
||||
featureDescription: {},
|
||||
},
|
||||
@@ -41,7 +41,7 @@ describe('PlansLocator', function () {
|
||||
it('should return the found plan', function () {
|
||||
const plan = this.PlansLocator.findLocalPlanInSettings('second')
|
||||
expect(plan).to.have.property('name', '2nd')
|
||||
expect(plan).to.have.property('price', 1500)
|
||||
expect(plan).to.have.property('price_in_cents', 1500)
|
||||
})
|
||||
it('should return null if no matching plan is found', function () {
|
||||
const plan = this.PlansLocator.findLocalPlanInSettings('gibberish')
|
||||
|
||||
@@ -6,24 +6,24 @@ const modulePath =
|
||||
const plans = {
|
||||
expensive: {
|
||||
planCode: 'expensive',
|
||||
price: 1500,
|
||||
price_in_cents: 1500,
|
||||
},
|
||||
cheaper: {
|
||||
planCode: 'cheaper',
|
||||
price: 500,
|
||||
price_in_cents: 500,
|
||||
},
|
||||
alsoCheap: {
|
||||
plancode: 'also-cheap',
|
||||
price: 500,
|
||||
price_in_cents: 500,
|
||||
},
|
||||
expensiveGroup: {
|
||||
plancode: 'group_expensive',
|
||||
price: 495,
|
||||
price_in_unit: 495,
|
||||
groupPlan: true,
|
||||
},
|
||||
cheapGroup: {
|
||||
plancode: 'group_cheap',
|
||||
price: 10,
|
||||
price_in_unit: 10,
|
||||
groupPlan: true,
|
||||
},
|
||||
bad: {},
|
||||
|
||||
Reference in New Issue
Block a user