Skip to content

Commit

Permalink
added acceptance test for security bounce
Browse files Browse the repository at this point in the history
  • Loading branch information
abarnhard committed Sep 3, 2014
1 parent ebe27c8 commit b9ecf12
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/acceptance/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ describe('users', function(){
});
});

describe('bounce (redirect /login)', function(){
it('should redirect to the login page if cookie isn\'t set', function(done){
request(app)
.post('/logout')
.send('_method=delete')
.end(function(err, res){
expect(res.status).to.equal(302);
expect(res.headers.location).to.equal('/login');
done();
});
});
});

describe('delete /logout', function(){
it('should redirect to the home page', function(done){
request(app)
Expand Down

0 comments on commit b9ecf12

Please sign in to comment.