MCPcopy
hub / github.com/parse-community/parse-server / createProduct

Function createProduct

spec/PurchaseValidation.spec.js:3–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1const request = require('../lib/request');
2
3function createProduct() {
4 const file = new Parse.File(
5 'name',
6 {
7 base64: new Buffer('download_file', 'utf-8').toString('base64'),
8 },
9 'text'
10 );
11 return file.save().then(function () {
12 const product = new Parse.Object('_Product');
13 product.set({
14 download: file,
15 icon: file,
16 title: 'a product',
17 subtitle: 'a product',
18 order: 1,
19 productIdentifier: 'a-product',
20 });
21 return product.save();
22 });
23}
24
25describe('test validate_receipt endpoint', () => {
26 beforeEach(async () => {

Callers 1

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected