Guest User

Untitled

a guest
Jul 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. describe('user is not logged in', function(){
  2. it('should log in the user', function(){
  3. var response = {
  4. session: null
  5. };
  6.  
  7. spyOn(FB, 'init');
  8. spyOn(FB, 'getLoginStatus');
  9. spyOn(FB, 'login');
  10.  
  11. step2._initialize();
  12.  
  13. expect(FB.init).toHaveBeenCalled();
  14. expect(FB.getLoginStatus).toHaveBeenCalled();
  15.  
  16. FB.getLoginStatus.mostRecentCall.args[0](response);
  17. expect(FB.login).toHaveBeenCalled();
  18. })
  19. })
Add Comment
Please, Sign In to add comment