fix
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javi Gallego 2021-08-31 16:37:09 +02:00
parent 488ef17559
commit d4fc64484a
1 changed files with 11 additions and 1 deletions

View File

@ -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});