fix user create response
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -80,7 +80,7 @@ function createUser(req, res, next) {
|
||||
resetToken: user.resetToken
|
||||
};
|
||||
|
||||
next(new HttpSuccess(201, { userInfo: userInfo }));
|
||||
next(new HttpSuccess(201, userInfo ));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user