Password reset does not need an email
This commit is contained in:
@@ -511,7 +511,7 @@ describe('database', function () {
|
||||
});
|
||||
|
||||
it('getByResetToken fails for empty resetToken', function (done) {
|
||||
userdb.getByResetToken(USER_0.email, '', function (error, user) {
|
||||
userdb.getByResetToken('', function (error, user) {
|
||||
expect(error).to.be.ok();
|
||||
expect(error.reason).to.be(BoxError.NOT_FOUND);
|
||||
expect(user).to.not.be.ok();
|
||||
@@ -519,8 +519,8 @@ describe('database', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('getByResetToken fails for bad email', function (done) {
|
||||
userdb.getByResetToken(USER_0.email + 'x', USER_0.resetToken, function (error, user) {
|
||||
it('getByResetToken fails for invalid resetToken', function (done) {
|
||||
userdb.getByResetToken('invalid', function (error, user) {
|
||||
expect(error).to.be.ok();
|
||||
expect(error.reason).to.be(BoxError.NOT_FOUND);
|
||||
expect(user).to.not.be.ok();
|
||||
@@ -529,7 +529,7 @@ describe('database', function () {
|
||||
});
|
||||
|
||||
it('can get by resetToken', function (done) {
|
||||
userdb.getByResetToken(USER_0.email, USER_0.resetToken, function (error, user) {
|
||||
userdb.getByResetToken(USER_0.resetToken, function (error, user) {
|
||||
expect(error).to.not.be.ok();
|
||||
expect(user).to.eql(USER_0);
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user