Ensure we send proper password requirements on password reset

This commit is contained in:
Johannes Zellner
2016-01-26 15:21:03 +01:00
parent ee9c8ba4eb
commit 9b4c385a64
2 changed files with 10 additions and 0 deletions

View File

@@ -1407,6 +1407,15 @@ describe('Password', function () {
});
});
it('fails due to weak password', function (done) {
superagent.post(SERVER_URL + '/api/v1/session/password/reset')
.send({ password: 'foobar', resetToken: USER_0.resetToken })
.end(function (error, result) {
expect(result.statusCode).to.equal(406);
done();
});
});
it('succeeds', function (done) {
var scope = nock(config.adminOrigin())
.filteringPath(function (path) {