title: Testing output of $q.all in angular controller
body: <p>My controller does something like below (pls note i had not shown all dependencies for sake of simplicity):</p>
  
  <pre><code>.controller('demo',function(){
  
        fn1(){
            var defereed = $q.defer;
            /* fetch data from server and once the data is fetched perform a resolve */
            return deferred.promise;
        }
  
       fn2(){
          var defereed = $q.defer;
            /* fetch data from server and once the data is fetched perform a resolve*/      
            return deferred.promise;
       }
  
       fun3() { /*makes some server side calls and updates the view*/}
  
       $q.all([fn1(),fn2()] .then(function(result){
             if (result[0]) { fn3();}
         });
  
      }
  </code></pre>
  
  <p>Under such circumstances I have having a hard time testing whether fn3() was called. I am also not able to get fn1() and fn2() to resolve so that i can test fn3()</p>
  
  <p>Any tips will be appreciated.</p>