Guest User

Untitled

a guest
Oct 21st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. it('fail: when not authenticated', function(){
  2.  
  3. spyOn(LoginService, "login").and.callFake(function(){
  4.  
  5. return q.when();
  6.  
  7. });
  8.  
  9. initiate_controller();
  10.  
  11. thisObject.credentials.username = 'dummy@dummmy.com';
  12.  
  13. thisObject.credentials.password = 'test';
  14.  
  15.  
  16.  
  17. thisObject.login();
  18.  
  19. $scope.$digest();
  20.  
  21. expect(thisObject.credentials.username).toEqual('');
  22.  
  23. expect(thisObject.credentials.password).toEqual('');
  24.  
  25. });
Add Comment
Please, Sign In to add comment