Skip to content

Commit

Permalink
Add userAPI#verifyEmail tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gocreating committed Nov 5, 2016
1 parent c122e4d commit cefda27
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions specs/endToEnd/apis/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,24 @@ describe('#userAPI', () => {
});
});

describe('#verifyEmail()', () => {
it('should be able to verify email', (done) => {
userAPI(apiEngine)
.verifyEmail({
token: userInstances.users[0].toVerifyEmailToken(),
})
.then((json) => {
expect(json).to.be.empty;

return userAPI(new ApiEngine(reqs.users[0])).read();
})
.then((json) => {
expect(json.user.email.isVerified).to.be.true;
done();
});
});
});

describe('#resetPassword()', () => {
it(
'[unauth user] should be able to reset password with a token',
Expand Down

0 comments on commit cefda27

Please sign in to comment.