UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
79 lines (71 loc) 2.7 kB
/* * TD Ameritrade API - OAuth2 * This is replication of the TD Ameritrade API. * * OpenAPI spec version: 0.1.4 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.14 * * 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.GitChrisQueen_TDA_JS); } }(this, function(expect, GitChrisQueen_TDA_JS) { 'use strict'; var instance; beforeEach(function() { instance = new GitChrisQueen_TDA_JS.AuthenticationApi(); }); describe('(package)', function() { describe('AuthenticationApi', function() { describe('oauth2TokenPOST', function() { it('should call oauth2TokenPOST successfully', function(done) { // TODO: uncomment, update parameter values for oauth2TokenPOST call and complete the assertions /* var grant_type = "grant_type_example"; var client_id = 56; var opts = {}; opts.refresh_token = "refresh_token_example"; opts.access_type = "access_type_example"; opts.code = "code_example"; opts.redirect_uri = "redirect_uri_example"; instance.oauth2TokenPOST(grant_type, client_id, opts).then(function(data) { // TODO: update response assertions expect(data).to.be.a(GitChrisQueen_TDA_JS.EASObject); expect(data.access_token).to.be.a('string'); expect(data.access_token).to.be(""); expect(data.expires_in).to.be.a('number'); expect(data.expires_in).to.be(0); expect(data.refresh_token).to.be.a('string'); expect(data.refresh_token).to.be(""); expect(data.refresh_token_expires_in).to.be.a('number'); expect(data.refresh_token_expires_in).to.be(0); expect(data.scope).to.be.a('string'); expect(data.scope).to.be(""); expect(data.token_type).to.be.a('string'); expect(data.token_type).to.be(""); done(); }, function(error) { done(error); }); */ // TODO: uncomment and complete method invocation above, then delete this line and the next: done(); }); }); }); }); }));