title: jasmine test fails with undefined is not a function(evaluating $browser.$$checkUrlChange())
body: <p>I have a following controller:</p>
  
  <pre><code>.controller('ProjectUserAddCtrl', ['$scope', 'ProjectUser', '$q', 'i18nNotifications',     
  function($scope, ProjectUser, $q, i18nNotifications) {
      var buildUnassignedUsers = function(users, project) {
          var unassignedUsers = [];
          angular.forEach(users, function(user) {
              var match;
              angular.forEach(project.projectUsers, function(projectUser) {
                  if(match) {return;}
                  if(projectUser.user.id === user.id) {
                      match = true;
                  }
              });
  
              if(!match) {
                  unassignedUsers.push(user);
              }
          });
  
          $scope.unassignedUsers = unassignedUsers;
      };     
  
      $q.all([
              $scope.users,
              $scope.project
      ]).then(function(result) {
              buildUnassignedUsers($scope.users, $scope.project);
              $scope.$watch('project', function(newVal) { 
                  buildUnassignedUsers($scope.users, $scope.project); }, true
              );
      });
  }]);
  </code></pre>
  
  <p>And a following test in jasmine:</p>
  
  <pre><code>describe('ProjectUserAddCtrl', function() {
      var ctrl;
      beforeEach(function(){
          $scope.users = [];
          $scope.project = {
              projectUsers: []
          };
          ctrl = $controller('ProjectUserAddCtrl', {$scope:$scope, ProjectUser:ProjectUser, $q:$q, i18nNotifications:i18nNotifications});
      });
  
      it('should create a new instance', function() {
          expect(ctrl).toBeDefined();
      });
  
      // this test fails!
      it('should create a list of unassigned users', function() {
          $scope.$apply(); // need to call apply to resolve promises
          expect($scope.unassignedUsers).toBeDefined();
      });
  
  });
  </code></pre>
  
  <p>'should create a list of unassigned users' test fails with this error:</p>
  
  <p>TypeError: 'undefined' is not a function(evaluating $browser.$$checkUrlChange())</p>
  
  <p>I really have no idea why. Any help appreciated.</p>