Skip to content

Commit

Permalink
fix(authentication): test for login needed to open the login form first
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Feb 28, 2013
1 parent 913fa0f commit b6c0384
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/gruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = function (grunt) {
};
if ( process.env.TRAVIS ) {
options.browsers = ['Firefox'];
options.reporters = 'dots';
}
return options;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ describe('authentication', function() {
it('calls queue.retry on a successful login', function() {
$httpBackend.when('POST', '/login').respond(200, {user: userInfo});
spyOn(queue, 'retryAll');
service.showLogin();
service.login('email', 'password');
$httpBackend.flush();
$rootScope.$digest();
expect(queue.retryAll).toHaveBeenCalled();
expect(currentUser.info()).toBe(userInfo);
});
Expand Down

0 comments on commit b6c0384

Please sign in to comment.