forked from MONEI/Shopify-api-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresource-feedback.test.js
More file actions
34 lines (24 loc) · 976 Bytes
/
resource-feedback.test.js
File metadata and controls
34 lines (24 loc) · 976 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
describe('Shopify#resourceFeedback', () => {
'use strict';
const expect = require('chai').expect;
const fixtures = require('./fixtures/resource-feedback');
const common = require('./common');
const shopify = common.shopify;
const scope = common.scope;
afterEach(() => expect(scope.isDone()).to.be.true);
it('creates a resource feedback', () => {
const input = fixtures.req.create;
const output = fixtures.res.create;
scope.post('/admin/resource_feedback.json', input).reply(202, output);
return shopify.resourceFeedback
.create(input.resource_feedback)
.then((data) => expect(data).to.deep.equal(output.resource_feedback));
});
it('gets a list of resource feedbacks', () => {
const output = fixtures.res.list;
scope.get('/admin/resource_feedback.json').reply(200, output);
return shopify.resourceFeedback
.list()
.then((data) => expect(data).to.deep.equal(output.resource_feedback));
});
});