-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have service.login() call expect(200) (#752)
- Loading branch information
1 parent
1c30cd9
commit 50894bd
Showing
2 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,8 +96,9 @@ describe('api: /users', () => { | |
asAlice.post('/v1/users') | ||
.send({ email: '[email protected]', password: '' }) | ||
.expect(200) // treats a blank password as no password provided | ||
.then(() => service.login({ email: '[email protected]', password: '' }, (failed) => | ||
failed.get('/v1/users/current').expect(401)))))); | ||
.then(() => service.post('/v1/sessions') | ||
.send({ email: '[email protected]', password: '' }) | ||
.expect(400))))); | ||
|
||
it('should not accept a password that is too short', testService((service) => | ||
service.login('alice', (asAlice) => | ||
|
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