Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it('fail: when not authenticated', function(){
- spyOn(LoginService, "login").and.callFake(function(){
- return q.when();
- });
- initiate_controller();
- thisObject.credentials.username = 'dummy@dummmy.com';
- thisObject.credentials.password = 'test';
- thisObject.login();
- $scope.$digest();
- expect(thisObject.credentials.username).toEqual('');
- expect(thisObject.credentials.password).toEqual('');
- });
Add Comment
Please, Sign In to add comment