salix/client/client/src/address-create/address-create.spec.js

49 lines
1.5 KiB
JavaScript
Raw Normal View History

//TEST PENDING DUE TO MISSING TRIGGER ON FORM SUBMIT.
// import './address-create.js';
// describe('Component vnAddressCreate', () => {
// let $componentController;
// let $state;
// let $scope;
// let $httpBackend;
// let vnApp;
// beforeEach(() => {
// angular.mock.module('client');
// });
// beforeEach(angular.mock.inject(function(_$componentController_, $rootScope, _$httpBackend_,_$state_, _vnApp_) {
// $componentController = _$componentController_;
// $scope = $rootScope.$new();
// $httpBackend = _$httpBackend_;
// $state = _$state_;
// vnApp = _vnApp_;
// spyOn(vnApp, 'showError');
// }));
// it('should request to update the password', function() {
// let controller = $componentController('vnAddressCreate', {$httpBackend: $httpBackend, $scope: $scope, $state: $state});
// controller.address = {
// agencyFk: 23,
// city: "Valencia",
// clientFk: 3,
// consignee: "sd",
// enabled: false,
// id: 22490,
// mobile: "123456789",
// phone: "98765432",
// postcode: "12345",
// provinceFk: 63,
// street: "a"
// };
// $httpBackend.when('PATCH', '/client/api/Addresses/3').respond('done');
// $httpBackend.expectPATCH('/client/api/Addresses/3', {
// clientFk: 3,
// enabled: true
// });
// $httpBackend.flush();
// });
// });