Skip to content

Commit

Permalink
fix #446 karma error
Browse files Browse the repository at this point in the history
  • Loading branch information
fyockm committed May 5, 2014
1 parent 4a9414d commit 3a9354b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/karma/unit/controllers/auth.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@

spyOn($rootScope, '$emit');
// test expected GET request
$httpBackend.when('POST','/login').respond(200, 'Fred');
$httpBackend.when('POST','/login').respond(200, {user: 'Fred'});
scope.login();
$httpBackend.flush();
// test scope value
expect($rootScope.user).toEqual('Fred');

expect($rootScope.$emit).toHaveBeenCalledWith('loggedin');
expect($location.url()).toEqual('/');
});
Expand Down

0 comments on commit 3a9354b

Please sign in to comment.