delete frontTest
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ba31d96cdf
commit
7f5b30aa87
|
@ -1,34 +0,0 @@
|
|||
import './index.js';
|
||||
import crudModel from 'core/mocks/crud-model';
|
||||
|
||||
describe('Item', () => {
|
||||
describe('Component vnItemTags', () => {
|
||||
let $scope;
|
||||
let controller;
|
||||
|
||||
beforeEach(ngModule('item'));
|
||||
|
||||
beforeEach(inject(($componentController, $rootScope) => {
|
||||
$scope = $rootScope.$new();
|
||||
$scope.model = crudModel;
|
||||
const $element = angular.element('<vn-item-tags></vn-item-tags>');
|
||||
controller = $componentController('vnItemTags', {$element, $scope});
|
||||
}));
|
||||
|
||||
describe('getHighestPriority', () => {
|
||||
it('should return the highest priority value + 1 from the array', () => {
|
||||
$scope.model.data = [{priority: 1}, {priority: 2}, {priority: 1}];
|
||||
let result = controller.getHighestPriority();
|
||||
|
||||
expect(result).toEqual(3);
|
||||
});
|
||||
|
||||
it('should return 1 when there is no priority defined', () => {
|
||||
$scope.model.data = [];
|
||||
let result = controller.getHighestPriority();
|
||||
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue