fix user create response

This commit is contained in:
Girish Ramakrishnan
2016-04-06 10:20:32 -07:00
parent 4c964bcaf8
commit 275d8c2121
4 changed files with 6 additions and 6 deletions

View File

@@ -182,7 +182,7 @@ describe('Apps', function () {
.end(function (err, res) {
expect(res.statusCode).to.equal(201);
USER_1_ID = res.body.userInfo.id;
USER_1_ID = res.body.id;
callback(null);
});

View File

@@ -70,7 +70,7 @@ function setup(done) {
expect(result.statusCode).to.eql(201);
token_1 = tokendb.generateToken();
userId_1 = result.body.userInfo.id;
userId_1 = result.body.id;
// HACK to get a token for second user (passwords are generated and the user should have gotten a password setup link...)
tokendb.add(token_1, userId_1, 'test-client-id', Date.now() + 100000, '*', callback);

View File

@@ -260,7 +260,7 @@ describe('User API', function () {
expect(error).to.not.be.ok();
expect(result.statusCode).to.equal(201);
user_1 = result.body.userInfo;
user_1 = result.body;
checkMails(2, function () {
// HACK to get a token for second user (passwords are generated and the user should have gotten a password setup link...)
@@ -380,7 +380,7 @@ describe('User API', function () {
.end(function (error, result) {
expect(result.statusCode).to.equal(201);
user_2 = result.body.userInfo;
user_2 = result.body;
superagent.post(SERVER_URL + '/api/v1/users')
.query({ access_token: token })
@@ -388,7 +388,7 @@ describe('User API', function () {
.end(function (error, result) {
expect(result.statusCode).to.equal(201);
user_3 = result.body.userInfo;
user_3 = result.body;
// one mail for first user creation, two mails for second user creation (see 'invite' flag)
checkMails(3, function () {

View File

@@ -80,7 +80,7 @@ function createUser(req, res, next) {
resetToken: user.resetToken
};
next(new HttpSuccess(201, { userInfo: userInfo }));
next(new HttpSuccess(201, userInfo ));
});
}