|
| 1 | +'use strict'; |
| 2 | + |
| 3 | +var stripe = require('../../testUtils').getSpyableStripe(); |
| 4 | + |
| 5 | +var expect = require('chai').expect; |
| 6 | + |
| 7 | +describe('Reporting', function () { |
| 8 | + describe('ReportRuns Resource', function () { |
| 9 | + describe('retrieve', function () { |
| 10 | + it('Sends the correct request', function () { |
| 11 | + stripe.reporting.reportRuns.retrieve('frr_123'); |
| 12 | + |
| 13 | + expect(stripe.LAST_REQUEST).to.deep.equal({ |
| 14 | + method: 'GET', |
| 15 | + url: '/v1/reporting/report_runs/frr_123', |
| 16 | + headers: {}, |
| 17 | + data: {}, |
| 18 | + }); |
| 19 | + }); |
| 20 | + }); |
| 21 | + |
| 22 | + describe('create', function () { |
| 23 | + it('Sends the correct request', function () { |
| 24 | + stripe.reporting.reportRuns.create({ |
| 25 | + parameters: { |
| 26 | + connected_account: 'acct_123', |
| 27 | + }, |
| 28 | + report_type: 'activity.summary.1', |
| 29 | + }); |
| 30 | + expect(stripe.LAST_REQUEST).to.deep.equal({ |
| 31 | + method: 'POST', |
| 32 | + url: '/v1/reporting/report_runs', |
| 33 | + headers: {}, |
| 34 | + data: { |
| 35 | + parameters: { |
| 36 | + connected_account: 'acct_123', |
| 37 | + }, |
| 38 | + report_type: 'activity.summary.1', |
| 39 | + }, |
| 40 | + }); |
| 41 | + }); |
| 42 | + }); |
| 43 | + |
| 44 | + describe('list', function () { |
| 45 | + it('Sends the correct request', function () { |
| 46 | + stripe.reporting.reportRuns.list(); |
| 47 | + expect(stripe.LAST_REQUEST).to.deep.equal({ |
| 48 | + method: 'GET', |
| 49 | + url: '/v1/reporting/report_runs', |
| 50 | + headers: {}, |
| 51 | + data: {}, |
| 52 | + }); |
| 53 | + }); |
| 54 | + }); |
| 55 | + }); |
| 56 | +}); |
0 commit comments