fix: test front
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
73ae45c2c0
commit
bb2eddc462
|
@ -14,6 +14,7 @@ describe('Item', () => {
|
|||
controller = $componentController('vnItemDiary', {$element, $scope});
|
||||
controller.$.model = crudModel;
|
||||
controller.$params = {id: 1};
|
||||
controller.card = {};
|
||||
}));
|
||||
|
||||
describe('set item()', () => {
|
||||
|
|
|
@ -14,12 +14,15 @@ describe('Item', () => {
|
|||
const $element = angular.element('<vn-item-summary></vn-item-summary>');
|
||||
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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue