infusionsoft-nodejs
Version:
A NodeJS SDK automatically generated from Infusionsoft API Swagger definitions.
114 lines (106 loc) • 3.88 kB
JavaScript
/**
* Infusionsoft REST API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: V1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.InfusionsoftRestApi);
}
}(this, function(expect, InfusionsoftRestApi) {
'use strict';
var instance;
beforeEach(function() {
instance = new InfusionsoftRestApi.OpportunityApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('OpportunityApi', function() {
describe('createOpportunityUsingPOST', function() {
it('should call createOpportunityUsingPOST successfully', function(done) {
//uncomment below and update the code to test createOpportunityUsingPOST
//instance.createOpportunityUsingPOST(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getOpportunityUsingGET', function() {
it('should call getOpportunityUsingGET successfully', function(done) {
//uncomment below and update the code to test getOpportunityUsingGET
//instance.getOpportunityUsingGET(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getStagePipelineUsingGET', function() {
it('should call getStagePipelineUsingGET successfully', function(done) {
//uncomment below and update the code to test getStagePipelineUsingGET
//instance.getStagePipelineUsingGET(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('listOpportunitiesUsingGET', function() {
it('should call listOpportunitiesUsingGET successfully', function(done) {
//uncomment below and update the code to test listOpportunitiesUsingGET
//instance.listOpportunitiesUsingGET(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('replaceOpportunityUsingPUT', function() {
it('should call replaceOpportunityUsingPUT successfully', function(done) {
//uncomment below and update the code to test replaceOpportunityUsingPUT
//instance.replaceOpportunityUsingPUT(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updateOpportunityUsingPATCH', function() {
it('should call updateOpportunityUsingPATCH successfully', function(done) {
//uncomment below and update the code to test updateOpportunityUsingPATCH
//instance.updateOpportunityUsingPATCH(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));