title: Unit testing controller which has a $state.go method in controller
body: <p>How can I write unit tests for a function that has a $state.go () and which is expected to redirect to that particular sate?</p>
  
  <pre><code>           $scope.inviteMembers = (id)=&gt; {
                  $state.go('invite', {deptId: id});
                  }
  </code></pre>