Skip to content

Commit

Permalink
Added a couple more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Cummuskey committed Feb 21, 2016
1 parent f350e61 commit 2531902
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"traceur": "0.0.102",
"traceur-runner": "^2.0.1",
"traceur-source-maps": "^1.0.6",
"underscore": "^1.8.3"
"underscore": "^1.8.3",
"http-constants": "1.1.0"
}
}
22 changes: 22 additions & 0 deletions src/test/api/auth/login.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,26 @@ describe('POST:/auth', () => {

});

describe('when successfully logged-in', () => {

let result = null;

before(() => {
return request('[email protected]', 'password').then((response) => {
result = response;
});
});

it('should not have a password listed.', () => {
expect(result.password).to.not.exist;
});

it('should have a list of user permissions', () => {
expect(result.permissions).to.exist;
expect(result.permissions).to.be.an('array');
expect(result.permissions.length).to.be.greaterThan(0);
});

});

});

0 comments on commit 2531902

Please sign in to comment.