angular unit test error

questionsangular unit test error
Shravan asked 3 years ago

I am trying to unit test this function

$scope.showAddComponentOrig = function (ev) {
        var confirm = $mdDialog.confirm()
            .title('Choose Component to Add')
            .ariaLabel('Lucky day')
        $ () {
            $scope.status = 'You decided to get rid of your debt.';
        }, function () {
            $scope.status = 'You decided to keep your debt.';

Here is my unit test code

    it('should open mdDialog', function () {
        scope.showAddComponentOrig ();

        expect(scope.status).toBe('You decided to get rid of your debt.');

I keep on seeing ReferenceError: getAddComponentHtml is not defined. Any ideas?