From bb2eddc462f7cebfe2d3667c39c334708819fde5 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 16 Feb 2023 07:32:44 +0100 Subject: [PATCH] fix: test front --- modules/item/front/diary/index.spec.js | 1 + modules/item/front/summary/index.spec.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/modules/item/front/diary/index.spec.js b/modules/item/front/diary/index.spec.js index a80fbfc69..a6302346d 100644 --- a/modules/item/front/diary/index.spec.js +++ b/modules/item/front/diary/index.spec.js @@ -14,6 +14,7 @@ describe('Item', () => { controller = $componentController('vnItemDiary', {$element, $scope}); controller.$.model = crudModel; controller.$params = {id: 1}; + controller.card = {}; })); describe('set item()', () => { diff --git a/modules/item/front/summary/index.spec.js b/modules/item/front/summary/index.spec.js index 0b349194c..d7821bea0 100644 --- a/modules/item/front/summary/index.spec.js +++ b/modules/item/front/summary/index.spec.js @@ -14,12 +14,15 @@ describe('Item', () => { const $element = angular.element(''); controller = $componentController('vnItemSummary', {$element, $scope}); controller.item = {id: 1}; + controller.card = {}; })); describe('getSummary()', () => { it('should perform a query to set summary', () => { let data = {id: 1, name: 'Gem of mind'}; $httpBackend.expect('GET', `Items/1/getSummary`).respond(200, data); + $httpBackend.expect('GET', `ItemConfigs/findOne`).respond({}); + $httpBackend.expect('GET', `Warehouses/findOne`).respond({}); controller.getSummary(); $httpBackend.flush();