Skip to content

Commit dc667cf

Browse files
Merge pull request #426 from stripe/brandur-fix-plans
Update subscriptions tests to pass with new API changes
2 parents ab9fbfb + 0c1973d commit dc667cf

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

test/flows.spec.js

+16-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ describe('Flows', function() {
4343
amount: 1700,
4444
currency: CURRENCY,
4545
interval: 'month',
46-
name: 'Gold Super Amazing Tier',
46+
nickname: 'Gold Super Amazing Tier',
47+
product: {
48+
name: 'product' + testUtils.getRandomString(),
49+
},
4750
}),
4851
stripe.customers.create(CUSTOMER_DETAILS)
4952
).then(function(j) {
@@ -71,7 +74,10 @@ describe('Flows', function() {
7174
amount: 1700,
7275
currency: CURRENCY,
7376
interval: 'month',
74-
name: 'Gold Super Amazing Tier',
77+
nickname: 'Gold Super Amazing Tier',
78+
product: {
79+
name: 'product' + testUtils.getRandomString(),
80+
},
7581
}),
7682
stripe.customers.create(CUSTOMER_DETAILS)
7783
).then(function(j) {
@@ -122,7 +128,10 @@ describe('Flows', function() {
122128
amount: 1700,
123129
currency: CURRENCY,
124130
interval: 'month',
125-
name: 'Silver Super Amazing Tier',
131+
nickname: 'Silver Super Amazing Tier',
132+
product: {
133+
name: 'product' + testUtils.getRandomString(),
134+
},
126135
}),
127136
stripe.customers.create(CUSTOMER_DETAILS)
128137
).then(function(j) {
@@ -157,7 +166,10 @@ describe('Flows', function() {
157166
amount: 1700,
158167
currency: CURRENCY,
159168
interval: 'month',
160-
name: 'generic',
169+
nickname: 'generic',
170+
product: {
171+
name: 'product' + testUtils.getRandomString(),
172+
},
161173
}).then(function() {
162174
cleanup.deletePlan(planID);
163175
return stripe.plans.retrieve(planID);

test/resources/Products.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ describe('Product Resource', function() {
2121
stripe.products.create({
2222
name: 'Llamas',
2323
active: true,
24+
type: 'good',
2425
});
2526
expect(stripe.LAST_REQUEST).to.deep.equal({
2627
method: 'POST',
2728
url: '/v1/products',
2829
data: {
2930
name: 'Llamas',
3031
active: true,
32+
type: 'good',
3133
},
3234
headers: {},
3335
});

0 commit comments

Comments
 (0)