Observer

This should not be here. This is for windowService test. You should expect only that the windowService.redirect is invoked. You break isolation. scope.logout() should not care where you are invoking http or not.