Created
June 22, 2017 16:51
-
-
Save lightsofapollo/7a6c926e52ab67409125361fb912aa66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('gets a route but is not authed', (done) => { | |
chai.request(server) | |
.get('/') | |
.end((err, res) => { | |
assert(res.request.url.endsWith('/login'), | |
'should be redirected to /login'); | |
done(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('gets a route but is not authed', async () => { | |
const res = await request(server).get('/').end(); | |
assert(res.request.url.endsWith('/login'), 'should be redirected to /login'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment