From d4fc64484a6ebd18b837da678403d8bb7ee969dd Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 31 Aug 2021 16:37:09 +0200 Subject: [PATCH] fix --- modules/supplier/front/account/index.spec.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/supplier/front/account/index.spec.js b/modules/supplier/front/account/index.spec.js index 929e43da36..29f0987cf4 100644 --- a/modules/supplier/front/account/index.spec.js +++ b/modules/supplier/front/account/index.spec.js @@ -5,10 +5,12 @@ describe('Supplier Component vnSupplierAccount', () => { let $element; let controller; let $httpBackend; + let $httpParamSerializer; beforeEach(ngModule('supplier')); - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { + beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { $httpBackend = _$httpBackend_; + $httpParamSerializer = _$httpParamSerializer_; $scope = $rootScope.$new(); $scope.bankEntity = { open: () => {} @@ -60,6 +62,14 @@ describe('Supplier Component vnSupplierAccount', () => { countryFk: 1, id: 2200 }; + const expectedParams = { + filter: { + where: {code: 'wireTransfer'} + } + }; + const serializedParams = $httpParamSerializer(expectedParams); + + $httpBackend.when('GET', `payMethods/findOne?${serializedParams}`).respond({id: 1}); const query = `SupplierAccounts/${controller.$.bankEntity.id}/createBankEntity`; $httpBackend.expectPATCH(query).respond({id: 2200});