hotfix_item.getVisible&Available #1339

Merged
vicent merged 2 commits from hotfix_item.getVisible&Available into test 2023-02-21 12:04:41 +00:00
1 changed files with 5 additions and 1 deletions
Showing only changes of commit c30242f9cc - Show all commits

View File

@ -4,12 +4,15 @@ describe('Item', () => {
describe('Component vnItemCard', () => {
let controller;
let $httpBackend;
let $state;
let data = {id: 1, name: 'fooName'};
beforeEach(ngModule('item'));
beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => {
beforeEach(inject(($componentController, _$httpBackend_, $stateParams, _$state_) => {
$httpBackend = _$httpBackend_;
$state = _$state_;
$state.getCurrentPath = () => [null, null, null, null, {state: {name: 'item.card.diary'}}];
let $element = angular.element('<div></div>');
controller = $componentController('vnItemCard', {$element});
@ -19,6 +22,7 @@ describe('Item', () => {
}));
it('should request data and set it on the controller', () => {
$httpBackend.expect('GET', `ItemConfigs/findOne`).respond({});
controller.reload();
$httpBackend.flush();