title: How to test angular $destroy in controller
body: <p>I have controller that listens for the destroy event, I cannot figure out how to test this event.</p>
  
  <p>Anyone know how to test destroy?</p>
  
  <p>In controller:</p>
  
  <pre><code>$scope.$on('$destroy', function () {
      //does something
  });
  </code></pre>
  
  <p>In tests:</p>
  
  <pre><code>beforeEach(inject(function ($rootScope, $injector) {
      rootScope = $injector.get('$rootScope');
      scope = $rootScope;
  }));
  
  it('should do something when scope $destroyed', function () {
      //how to trigger the destroy event listened for in controller?
      expect(somefunction).toHaveBeenCalled();
  });
  </code></pre>
  
  <p>Thank-you</p>