182 lines
6.0 KiB
JavaScript
182 lines
6.0 KiB
JavaScript
/*
|
|
*
|
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
*
|
|
* OpenAPI spec version:
|
|
*
|
|
* 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.18
|
|
*
|
|
* 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.SwaggerJsClient);
|
|
}
|
|
}(this, function(expect, SwaggerJsClient) {
|
|
'use strict';
|
|
|
|
var instance;
|
|
|
|
beforeEach(function() {
|
|
instance = new SwaggerJsClient.UserApiApi();
|
|
});
|
|
|
|
describe('(package)', function() {
|
|
describe('UserApiApi', function() {
|
|
describe('getUserInfo', function() {
|
|
it('should call getUserInfo successfully', function(done) {
|
|
// TODO: uncomment, update parameter values for getUserInfo call and complete the assertions
|
|
/*
|
|
var id = "id_example";
|
|
var body = new SwaggerJsClient.UserInfoReq();
|
|
body.id = "";
|
|
|
|
instance.getUserInfo(id, body, function(error, data, response) {
|
|
if (error) {
|
|
done(error);
|
|
return;
|
|
}
|
|
// TODO: update response assertions
|
|
expect(data).to.be.a(SwaggerJsClient.UserInfoReply);
|
|
expect(data.name).to.be.a('string');
|
|
expect(data.name).to.be("");
|
|
expect(data.age).to.be.a('number');
|
|
expect(data.age).to.be(0);
|
|
expect(data.birthday).to.be.a('string');
|
|
expect(data.birthday).to.be("");
|
|
expect(data.description).to.be.a('string');
|
|
expect(data.description).to.be("");
|
|
{
|
|
let dataCtr = data.tag;
|
|
expect(dataCtr).to.be.an(Array);
|
|
expect(dataCtr).to.not.be.empty();
|
|
for (let p in dataCtr) {
|
|
let data = dataCtr[p];
|
|
expect(data).to.be.a('string');
|
|
expect(data).to.be("");
|
|
}
|
|
}
|
|
|
|
done();
|
|
});
|
|
*/
|
|
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
done();
|
|
});
|
|
});
|
|
describe('login', function() {
|
|
it('should call login successfully', function(done) {
|
|
// TODO: uncomment, update parameter values for login call and complete the assertions
|
|
/*
|
|
var body = new SwaggerJsClient.LoginReq();
|
|
body.username = "";
|
|
body.password = "";
|
|
|
|
instance.login(body, function(error, data, response) {
|
|
if (error) {
|
|
done(error);
|
|
return;
|
|
}
|
|
// TODO: update response assertions
|
|
expect(data).to.be.a(Object);
|
|
// expect(data).to.be(null);
|
|
|
|
done();
|
|
});
|
|
*/
|
|
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
done();
|
|
});
|
|
});
|
|
describe('register', function() {
|
|
it('should call register successfully', function(done) {
|
|
// TODO: uncomment, update parameter values for register call and complete the assertions
|
|
/*
|
|
var body = new SwaggerJsClient.RegisterReq();
|
|
body.username = "";
|
|
body.password = "";
|
|
body.mobile = "";
|
|
|
|
instance.register(body, function(error, data, response) {
|
|
if (error) {
|
|
done(error);
|
|
return;
|
|
}
|
|
// TODO: update response assertions
|
|
expect(data).to.be.a(Object);
|
|
// expect(data).to.be(null);
|
|
|
|
done();
|
|
});
|
|
*/
|
|
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
done();
|
|
});
|
|
});
|
|
describe('searchUser', function() {
|
|
it('should call searchUser successfully', function(done) {
|
|
// TODO: uncomment, update parameter values for searchUser call and complete the assertions
|
|
/*
|
|
var body = new SwaggerJsClient.UserSearchReq();
|
|
body.keyWord = "";
|
|
|
|
instance.searchUser(body, function(error, data, response) {
|
|
if (error) {
|
|
done(error);
|
|
return;
|
|
}
|
|
// TODO: update response assertions
|
|
expect(data).to.be.a(SwaggerJsClient.UserSearchReply);
|
|
{
|
|
let dataCtr = data.keyWord;
|
|
expect(dataCtr).to.be.an(Array);
|
|
expect(dataCtr).to.not.be.empty();
|
|
for (let p in dataCtr) {
|
|
let data = dataCtr[p];
|
|
expect(data).to.be.a(SwaggerJsClient.UserInfoReply);
|
|
expect(data.name).to.be.a('string');
|
|
expect(data.name).to.be("");
|
|
expect(data.age).to.be.a('number');
|
|
expect(data.age).to.be(0);
|
|
expect(data.birthday).to.be.a('string');
|
|
expect(data.birthday).to.be("");
|
|
expect(data.description).to.be.a('string');
|
|
expect(data.description).to.be("");
|
|
{
|
|
let dataCtr = data.tag;
|
|
expect(dataCtr).to.be.an(Array);
|
|
expect(dataCtr).to.not.be.empty();
|
|
for (let p in dataCtr) {
|
|
let data = dataCtr[p];
|
|
expect(data).to.be.a('string');
|
|
expect(data).to.be("");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
done();
|
|
});
|
|
*/
|
|
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
}));
|