Fix failed wizard tests

After refactoring angular wizard widget, some API
method defined in scope no longer exist. Removing
those tests against removed the APIs.

Change-Id: I72f64f1a11dad7501c2419f474b21463b90f2149
Closes-Bug: #1462134
This commit is contained in:
Shaoquan Chen 2015-06-04 15:18:41 -07:00
parent ce01e5eec6
commit 169ca3bd65
1 changed files with 0 additions and 42 deletions

View File

@ -177,48 +177,6 @@
expect(checkedStep.checkReadiness).toHaveBeenCalled();
});
describe('Broadcast Functions', function() {
beforeEach(function() {
$scope.workflow = {
steps: [{}, {}, {}]
};
$scope.$digest();
});
it('sets beforeSubmit to broadcast BEFORE_SUBMIT', function() {
expect($scope.beforeSubmit).toBeDefined();
spyOn($scope, '$broadcast');
$scope.beforeSubmit();
expect($scope.$broadcast).toHaveBeenCalledWith('BEFORE_SUBMIT');
});
it('sets afterSubmit to broadcast AFTER_SUBMIT', function() {
expect($scope.afterSubmit).toBeDefined();
spyOn($scope, '$broadcast');
$scope.close = angular.noop;
spyOn($scope, 'close');
$scope.afterSubmit();
expect($scope.$broadcast).toHaveBeenCalledWith('AFTER_SUBMIT');
expect($scope.close).toHaveBeenCalled();
});
it('sets onClickFinishBtn and submits with proper handlers', function() {
expect($scope.onClickFinishBtn).toBeDefined();
var submitObj = { then: function() { return; } };
$scope.submit = function() { return submitObj; };
spyOn($scope, 'beforeSubmit');
spyOn(submitObj, 'then');
$scope.onClickFinishBtn();
expect($scope.beforeSubmit).toHaveBeenCalled();
expect(submitObj.then).toHaveBeenCalled();
expect(submitObj.then.calls.count()).toBe(1);
expect(submitObj.then.calls.argsFor(0)).toEqual([$scope.afterSubmit,
$scope.showError]);
});
});
});
describe("ModalContainerCtrl", function() {