test fixed
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
6058e2a60a
commit
40e589203e
|
@ -15,8 +15,6 @@ describe('Supplier Component vnSupplierAccount', () => {
|
|||
$scope.bankEntity = {
|
||||
open: () => {}
|
||||
};
|
||||
$httpBackend.whenRoute('GET', 'PayMethods')
|
||||
.respond([{id: 1}]);
|
||||
|
||||
const $element = angular.element('<vn-supplier-account></vn-supplier-account>');
|
||||
controller = $componentController('vnSupplierAccount', {$element, $scope});
|
||||
|
@ -43,28 +41,7 @@ describe('Supplier Component vnSupplierAccount', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('onSubmit__()', () => {
|
||||
it(`should reload the card`, () => {
|
||||
controller.card = {reload: () => {}};
|
||||
jest.spyOn($scope.watcher, 'check');
|
||||
jest.spyOn($scope.watcher, 'notifySaved');
|
||||
jest.spyOn($scope.watcher, 'updateOriginalData');
|
||||
jest.spyOn(controller.card, 'reload');
|
||||
jest.spyOn($scope.model, 'save');
|
||||
console.log($scope.model);
|
||||
controller.onSubmit();
|
||||
|
||||
expect($scope.model.save).toHaveBeenCalledWith();
|
||||
expect($scope.watcher.updateOriginalData).toHaveBeenCalledWith();
|
||||
expect($scope.watcher.check).toHaveBeenCalledWith();
|
||||
expect($scope.watcher.notifySaved).toHaveBeenCalledWith();
|
||||
expect(controller.card.reload).toHaveBeenCalledWith();
|
||||
|
||||
expect(controller.$.payMethodToTransfer.show).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
fdescribe('onSubmit()', () => {
|
||||
describe('onSubmit()', () => {
|
||||
it(`should reload the card`, done => {
|
||||
controller.card = {reload: () => {}};
|
||||
controller.$.payMethodToTransfer = {show: () => {}};
|
||||
|
|
Loading…
Reference in New Issue