-
-
Notifications
You must be signed in to change notification settings - Fork 276
Expand file tree
/
Copy pathtender-transaction.test.js
More file actions
35 lines (25 loc) · 1003 Bytes
/
tender-transaction.test.js
File metadata and controls
35 lines (25 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
describe('Shopify#tenderTransaction', () => {
'use strict';
const expect = require('chai').expect;
const fixtures = require('./fixtures/tender-transaction');
const common = require('./common');
const shopify = common.shopify;
const scope = common.scope;
afterEach(() => expect(scope.pendingMocks()).to.deep.equal([]));
it('gets a list of tender transactions (1/2)', () => {
const output = fixtures.res.list;
scope.get('/admin/tender_transactions.json').reply(200, output);
return shopify.tenderTransaction
.list()
.then((data) => expect(data).to.deep.equal(output.tender_transactions));
});
it('gets a list of tender transactions (2/2)', () => {
const output = fixtures.res.list;
scope
.get('/admin/tender_transactions.json?since_id=776836109')
.reply(200, output);
return shopify.tenderTransaction
.list({ since_id: 776836109 })
.then((data) => expect(data).to.deep.equal(output.tender_transactions));
});
});