diff --git a/modules/account/front/aliases/index.spec.js b/modules/account/front/aliases/index.spec.js index 466f1e1e9..53ce9e5d7 100644 --- a/modules/account/front/aliases/index.spec.js +++ b/modules/account/front/aliases/index.spec.js @@ -9,6 +9,7 @@ describe('component vnUserAliases', () => { beforeEach(inject(($componentController, _$httpBackend_) => { $httpBackend = _$httpBackend_; controller = $componentController('vnUserAliases', {$element: null}); + controller.$params.id = 1; jest.spyOn(controller.vnApp, 'showSuccess'); })); @@ -26,7 +27,7 @@ describe('component vnUserAliases', () => { it('should add the new row', () => { controller.addData = {account: 1}; - $httpBackend.expectPOST('MailAliasAccounts').respond(); + $httpBackend.expectPOST(`Accounts/${controller.$params.id}/addMailAlias`).respond(); $httpBackend.expectGET('MailAliasAccounts').respond('foo'); controller.onAddSave(); $httpBackend.flush(); @@ -42,7 +43,7 @@ describe('component vnUserAliases', () => { {id: 2, alias: 'bar'} ]; - $httpBackend.expectDELETE('MailAliasAccounts/1').respond(); + $httpBackend.expectPOST(`Accounts/${controller.$params.id}/deleteMailAlias`).respond(); controller.onRemove(controller.$.data[0]); $httpBackend.flush();