Skip to content

Commit

Permalink
fixed POST auth/login tests to actually run
Browse files Browse the repository at this point in the history
  • Loading branch information
uptownhr committed Apr 19, 2016
1 parent 7a183de commit c6dabcc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,15 @@ describe( 'App', function(){

it('should not log user in if bad password', function(done){
user.get('/auth/logout')
.then( function(){
.expect(302, function(){
return user.post('/auth/login').send({email: 'admin@admin.com'})
.expect(302)
.expect(302, function(){
user
.get('/admin/')
.expect(302, done)
})

})
.then( function(){
user
.get('/admin/')
.expect(302, done)
})
})
})
})

0 comments on commit c6dabcc

Please sign in to comment.