This commit is contained in:
parent
137e01e60c
commit
beb173f6ce
|
@ -19,6 +19,7 @@ class Controller extends ModuleCard {
|
|||
}
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
|
||||
this.$http.get(`Departments/${this.$params.id}`, {filter})
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
import './index.js';
|
||||
|
||||
describe('vnWorkerDepartmentDescriptor', () => {
|
||||
let controller;
|
||||
let $httpBackend;
|
||||
|
||||
beforeEach(ngModule('worker'));
|
||||
|
||||
beforeEach(inject(($componentController, _$httpBackend_) => {
|
||||
$httpBackend = _$httpBackend_;
|
||||
controller = $componentController('vnWorkerDepartmentDescriptor', {$element: null});
|
||||
}));
|
||||
|
||||
describe('loadData()', () => {
|
||||
it(`should perform a get query to store the department data into the controller`, () => {
|
||||
const id = '31';
|
||||
const response = 'foo';
|
||||
|
||||
$httpBackend.expectRoute('GET', `Departments/${id}`).respond(response);
|
||||
controller.id = id;
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(controller.department).toEqual(response);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue