Ensure we actually update the correct user, not the user holding the token

This commit is contained in:
Johannes Zellner
2016-01-25 14:58:02 +01:00
parent ea18ca5c60
commit 35c926d504
2 changed files with 26 additions and 4 deletions

View File

@@ -356,6 +356,22 @@ describe('User', function () {
});
});
});
it('succeeds with same data', function (done) {
user.update(USERNAME, USERNAME_NEW, EMAIL_NEW, DISPLAY_NAME_NEW, function (error) {
expect(error).to.not.be.ok();
user.get(USERNAME, function (error, result) {
expect(error).to.not.be.ok();
expect(result).to.be.ok();
expect(result.email).to.equal(EMAIL_NEW);
expect(result.username).to.equal(USERNAME_NEW);
expect(result.displayName).to.equal(DISPLAY_NAME_NEW);
done();
});
});
});
});
describe('admin change', function () {