Fixed tests

master
Keith Irwin 2018-02-25 04:59:55 +00:00
parent b93efe932b
commit bfaa034467
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
2 changed files with 10 additions and 10 deletions

View File

@ -135,7 +135,7 @@ module.exports = (app, passport) => {
if (!mw.validateEmail(req.body.email)) {
debug(`Email ${req.body.email} was found invalid!`)
req.flash('warning', `The email you entered, ${req.body.email} isn't valid. Try again. `)
res.redirect('/login#login')
res.redirect('/login#signup')
next()
// Valid email

View File

@ -38,10 +38,10 @@ describe('Authentication', () => {
).to.redirectTo('/login#signup')
/* Ensure user was deleted after email failed to send
/* Users with bad emails are removed asynchronously and may happen after
/* the response was recieved. Ensure it's happened in a kludgy way by
/* waiting 2 seconds before asserting that the user doesn't exist
*/
* Users with bad emails are removed asynchronously and may happen after
* the response was recieved. Ensure it's happened in a kludgy way by
* waiting 2 seconds before asserting that the user doesn't exist
*/
setTimeout( async () => {
chai.assert.isNull( await User.findOne({
'email': FAKE_EMAIL
@ -61,10 +61,10 @@ describe('Authentication', () => {
).to.redirectTo('/login#signup')
/* Ensure user was deleted after email failed to send
/* Users with bad emails are removed asynchronously and may happen after
/* the response was recieved. Ensure it's happened in a kludgy way by
/* waiting 2 seconds before asserting that the user doesn't exist
*/
* Users with bad emails are removed asynchronously and may happen after
* the response was recieved. Ensure it's happened in a kludgy way by
* waiting 2 seconds before asserting that the user doesn't exist
*/
setTimeout( async () => {
chai.assert.isNull( await User.findOne({
'email': fuzzed_email
@ -159,7 +159,7 @@ describe('Authentication', () => {
})
it.skip('Loads forgot password page', async () => {
it('Loads forgot password page', async () => {
let res = await request.get('/login/forgot')
chai.expect(res).html.to.have.status(200)
})