From e8adb98c98b1a85766fb8646efebbb254025a378 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Sun, 28 Jun 2020 15:33:50 -0700 Subject: [PATCH] Fix tests for `Plan` and `Price` to not appear as amount can be updated. --- test/resources/Plans.spec.js | 17 ++++++++--------- test/resources/Prices.spec.js | 9 ++++----- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/test/resources/Plans.spec.js b/test/resources/Plans.spec.js index 4c9be4df03..3757f7dfed 100644 --- a/test/resources/Plans.spec.js +++ b/test/resources/Plans.spec.js @@ -6,10 +6,10 @@ const expect = require('chai').expect; describe('Plans Resource', () => { describe('retrieve', () => { it('Sends the correct request', () => { - stripe.plans.retrieve('planId1'); + stripe.plans.retrieve('plan_123'); expect(stripe.LAST_REQUEST).to.deep.equal({ method: 'GET', - url: '/v1/plans/planId1', + url: '/v1/plans/plan_123', headers: {}, data: {}, settings: {}, @@ -96,15 +96,14 @@ describe('Plans Resource', () => { describe('update', () => { it('Sends the correct request', () => { - stripe.plans.update('planId3', { - amount: 1900, - currency: 'usd', + stripe.plans.update('plan_123', { + active: false, }); expect(stripe.LAST_REQUEST).to.deep.equal({ method: 'POST', - url: '/v1/plans/planId3', + url: '/v1/plans/plan_123', headers: {}, - data: {amount: 1900, currency: 'usd'}, + data: {active: false}, settings: {}, }); }); @@ -112,10 +111,10 @@ describe('Plans Resource', () => { describe('del', () => { it('Sends the correct request', () => { - stripe.plans.del('planId4'); + stripe.plans.del('plan_123'); expect(stripe.LAST_REQUEST).to.deep.equal({ method: 'DELETE', - url: '/v1/plans/planId4', + url: '/v1/plans/plan_123', headers: {}, data: {}, settings: {}, diff --git a/test/resources/Prices.spec.js b/test/resources/Prices.spec.js index 132a1b3ec9..2b36881215 100644 --- a/test/resources/Prices.spec.js +++ b/test/resources/Prices.spec.js @@ -50,15 +50,14 @@ describe('Plans Resource', () => { describe('update', () => { it('Sends the correct request', () => { - stripe.prices.update('priceId3', { - amount: 1900, - currency: 'usd', + stripe.prices.update('price_123', { + active: false, }); expect(stripe.LAST_REQUEST).to.deep.equal({ method: 'POST', - url: '/v1/prices/priceId3', + url: '/v1/prices/price_123', headers: {}, - data: {amount: 1900, currency: 'usd'}, + data: {active: false}, settings: {}, }); });