removed unused spec files
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
a2a9dfd7e5
commit
a35533687f
|
@ -1,37 +0,0 @@
|
||||||
import './index';
|
|
||||||
|
|
||||||
describe('Client', () => {
|
|
||||||
describe('Component vnClientLog', () => {
|
|
||||||
let $componentController;
|
|
||||||
let $scope;
|
|
||||||
let controller;
|
|
||||||
|
|
||||||
beforeEach(ngModule('client'));
|
|
||||||
|
|
||||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
|
|
||||||
$componentController = _$componentController_;
|
|
||||||
$scope = $rootScope.$new();
|
|
||||||
controller = $componentController('vnClientLog', {$scope: $scope});
|
|
||||||
controller.$scope.model = {data: [{newInstance: {id: 1}, oldInstance: {id: 2}}]};
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('logs setter', () => {
|
|
||||||
it('should call the function getInstance() twice', () => {
|
|
||||||
spyOn(controller, 'getInstance');
|
|
||||||
controller.logs = [{newInstance: {id: 1}, oldInstance: {id: 2}}];
|
|
||||||
|
|
||||||
expect(controller.getInstance.calls.count()).toBe(2);
|
|
||||||
expect(controller.getInstance).toHaveBeenCalledWith({id: 1});
|
|
||||||
expect(controller.getInstance).toHaveBeenCalledWith({id: 2});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('getInstance(instance)', () => {
|
|
||||||
it('should transform the object given in to an array', () => {
|
|
||||||
let newInstance = controller.getInstance(controller.$scope.model.data[0].newInstance);
|
|
||||||
|
|
||||||
expect(newInstance).toEqual([{key: 'id', value: 1}]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,37 +0,0 @@
|
||||||
import './index';
|
|
||||||
|
|
||||||
describe('Route', () => {
|
|
||||||
describe('Component vnRouteLog', () => {
|
|
||||||
let $componentController;
|
|
||||||
let $scope;
|
|
||||||
let controller;
|
|
||||||
|
|
||||||
beforeEach(ngModule('route'));
|
|
||||||
|
|
||||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
|
|
||||||
$componentController = _$componentController_;
|
|
||||||
$scope = $rootScope.$new();
|
|
||||||
controller = $componentController('vnRouteLog', {$scope: $scope});
|
|
||||||
controller.$scope.model = {data: [{newInstance: {id: 1}, oldInstance: {id: 2}}]};
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('logs setter', () => {
|
|
||||||
it('should call the function getInstance() twice', () => {
|
|
||||||
spyOn(controller, 'getInstance');
|
|
||||||
controller.logs = [{newInstance: {id: 1}, oldInstance: {id: 2}}];
|
|
||||||
|
|
||||||
expect(controller.getInstance.calls.count()).toBe(2);
|
|
||||||
expect(controller.getInstance).toHaveBeenCalledWith({id: 1});
|
|
||||||
expect(controller.getInstance).toHaveBeenCalledWith({id: 2});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('getInstance(instance)', () => {
|
|
||||||
it('should transform the object given in to an array', () => {
|
|
||||||
let newInstance = controller.getInstance(controller.$scope.model.data[0].newInstance);
|
|
||||||
|
|
||||||
expect(newInstance).toEqual([{key: 'id', value: 1}]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,37 +0,0 @@
|
||||||
import './index';
|
|
||||||
|
|
||||||
describe('Ticket', () => {
|
|
||||||
describe('Component vnTicketLog', () => {
|
|
||||||
let $componentController;
|
|
||||||
let $scope;
|
|
||||||
let controller;
|
|
||||||
|
|
||||||
beforeEach(ngModule('ticket'));
|
|
||||||
|
|
||||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
|
|
||||||
$componentController = _$componentController_;
|
|
||||||
$scope = $rootScope.$new();
|
|
||||||
controller = $componentController('vnTicketLog', {$scope: $scope});
|
|
||||||
controller.$scope.model = {data: [{newInstance: {id: 1}, oldInstance: {id: 2}}]};
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('logs setter', () => {
|
|
||||||
it('should call the function getInstance() twice', () => {
|
|
||||||
spyOn(controller, 'getInstance');
|
|
||||||
controller.logs = [{newInstance: {id: 1}, oldInstance: {id: 2}}];
|
|
||||||
|
|
||||||
expect(controller.getInstance.calls.count()).toBe(2);
|
|
||||||
expect(controller.getInstance).toHaveBeenCalledWith({id: 1});
|
|
||||||
expect(controller.getInstance).toHaveBeenCalledWith({id: 2});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('getInstance(instance)', () => {
|
|
||||||
it('should transform the object given in to an array', () => {
|
|
||||||
const newInstance = controller.getInstance(controller.$scope.model.data[0].newInstance);
|
|
||||||
|
|
||||||
expect(newInstance).toEqual([{key: 'id', value: 1}]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue