title: Testing modal.open() using Jasmine
body: <p>So this is my $scope function. I want to test this by Jasmine. </p>
  
  <pre><code>$scope.viewIndividualDetailsByTitle = function(details){
          $modal.open({
               templateUrl: 'components/content-management/content-assessment/partial/title_detail.html',
               controller: 'ContentAssessmentTitleDetailCtrl',
               size: 'lg',
               backdrop: 'static',
               resolve: {
               cpPortfolioTitle: function(){
                      return details;
               }
               }
          });
  
       };
  </code></pre>
  
  <p>This is what I wrote in Jasmine.</p>
  
  <pre><code>describe('Ctrl: ContentAssessmentCtrl', function(){
  beforeEach(module('cmsApp'));
  var ContentAssessmentCtrl, scope, modal, modalInstance, httpBackend, ContentAssessmentService, event, controller;
  
  beforeEach(inject(function($controller, $rootScope, $modal, $httpBackend, _ContentAssessmentService_){
      scope = $rootScope.$new();
      modal = $modal;
      httpBackend = $httpBackend;
      ContentAssessmentService = _ContentAssessmentService_;
  
      ContentAssessmentCtrl = $controller('ContentAssessmentCtrl', {
          $scope: scope,
          ContentAssessmentService: ContentAssessmentService
      });
  
      modalServiceMock = {
          open: function(options) {
          }
      };
  
      httpBackend.whenGET('/mcw/api/content_provider_status_mapping/contentProviderStatus/3').respond();
      scope.$digest();
  }));
  
  
  
  it('should test viewIndividualDetailsByTitle', function(){
      var details = {
          contentProvider:{
              name:'Test'
          },
          title: 'Test',
          productionYear: 1,
          titleCategory:{
              name:'Test'
          },
          runningTime: 1,
          country:{
              name:'Test',
              code:'Test'
          }
      };
  });
  
  it('should show the modal', function(){
      spyOn(modal, 'open');
      expect(modal.open).toHaveBeenCalled();
  });
  
  
  });
  </code></pre>
  
  <p>But I always have an error "Expected spy to have been called. I'm new on Jasmine like this is my first time so please bear with me. Thanks</p>