billing data copyData test

This commit is contained in:
Carlos 2017-08-29 15:14:18 +02:00
parent ca9906de33
commit d3600858ee
1 changed files with 31 additions and 55 deletions

View File

@ -1,59 +1,35 @@
// import './billing-data.js'; import './billing-data.js';
// describe('Component vnClientBillingData', () => { describe('Component vnClientBillingData', () => {
// let $componentController; let $componentController;
// let $scope; let $scope;
// let vnApp; let vnApp;
// beforeEach(() => { beforeEach(() => {
// angular.mock.module('client'); angular.mock.module('client');
// }); });
// beforeEach(angular.mock.inject(function(_$componentController_, $rootScope, _$q_, _vnApp_) { beforeEach(angular.mock.inject(function(_$componentController_, $rootScope, _vnApp_) {
// $componentController = _$componentController_; $componentController = _$componentController_;
// $scope = $rootScope.$new(); $scope = $rootScope.$new();
// vnApp = _vnApp_; vnApp = _vnApp_;
// spyOn(vnApp, 'showError'); spyOn(vnApp, 'showError');
// })); }));
// // describe('$onChanges()', () => { describe('copyData()', () => {
// // it(`should call copyData()`, () => { it(`should define billData using client's data`, () => {
let controller = $componentController('vnClientBillingData', {$scope: $scope});
// // }); controller.client = {
// // }); credit: 1000000000000,
creditInsurance: null,
// describe('copyData()', () => { discount: 99,
// it(`should pass client data to billData`, () => { dueDay: 0,
// let controller = $componentController('vnClientBillingData', {$scope: $scope}); iban: null,
// controller.client = { payMethodFk: 1
// payMethodFk: 'this', };
// iban: 'is', controller.billData = {};
// dueDay: 'basically', controller.copyData(controller.client);
// discount: 'nonsense', expect(controller.billData).toEqual(controller.client);
// credit: 'test', });
// creditInsurance: 'text!' });
// }; });
// controller.copyData();
// expect(controller.billData).toEqual(controller.client);
// });
// });
// describe('submit()', () => {
// it(`should call submit() on the watcher then receive a callback`, () => {
// let controller = $componentController('vnClientBillingData', {$scope: $scope});
// spyOn(controller, 'submit');
// controller.submit();
// expect(controller.submit).toHaveBeenCalled();
// // controller.client = {
// // payMethodFk: 'this',
// // iban: 'is',
// // dueDay: 'basically',
// // discount: 'nonsense',
// // credit: 'test',
// // creditInsurance: 'text!'
// // };
// // controller.copyData();
// // expect(controller.billData).toEqual(controller.client);
// });
// });
// });