rename function to sendPasswordResetByIdentifier
This commit is contained in:
@@ -912,12 +912,12 @@ describe('User', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('resetPasswordByIdentifier', function () {
|
||||
describe('sendPasswordResetByIdentifier', function () {
|
||||
before(createOwner);
|
||||
after(cleanupUsers);
|
||||
|
||||
it('fails due to unkown email', function (done) {
|
||||
users.resetPasswordByIdentifier('unknown@mail.com', function (error) {
|
||||
users.sendPasswordResetByIdentifier('unknown@mail.com', function (error) {
|
||||
expect(error).to.be.an(BoxError);
|
||||
expect(error.reason).to.eql(BoxError.NOT_FOUND);
|
||||
done();
|
||||
@@ -925,7 +925,7 @@ describe('User', function () {
|
||||
});
|
||||
|
||||
it('fails due to unkown username', function (done) {
|
||||
users.resetPasswordByIdentifier('unknown', function (error) {
|
||||
users.sendPasswordResetByIdentifier('unknown', function (error) {
|
||||
expect(error).to.be.an(BoxError);
|
||||
expect(error.reason).to.eql(BoxError.NOT_FOUND);
|
||||
done();
|
||||
@@ -933,14 +933,14 @@ describe('User', function () {
|
||||
});
|
||||
|
||||
it('succeeds with email', function (done) {
|
||||
users.resetPasswordByIdentifier(EMAIL, function (error) {
|
||||
users.sendPasswordResetByIdentifier(EMAIL, function (error) {
|
||||
expect(error).to.not.be.ok();
|
||||
checkMails(1, done);
|
||||
});
|
||||
});
|
||||
|
||||
it('succeeds with username', function (done) {
|
||||
users.resetPasswordByIdentifier(USERNAME, function (error) {
|
||||
users.sendPasswordResetByIdentifier(USERNAME, function (error) {
|
||||
expect(error).to.not.be.ok();
|
||||
checkMails(1, done);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user