6028_route_getRouteByWorker #1857
|
@ -209,22 +209,6 @@ describe('Route', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('guessPriority()', () => {
|
|
||||||
it('should perform a GET query then call both refresh and showSuccess methods', () => {
|
|
||||||
jest.spyOn(controller.$.model, 'refresh');
|
|
||||||
jest.spyOn(controller.vnApp, 'showSuccess');
|
|
||||||
controller.$params = {id: 99};
|
|
||||||
|
|
||||||
const url = `Routes/${controller.$params.id}/guessPriority/`;
|
|
||||||
$httpBackend.expectGET(url).respond('ok');
|
|
||||||
controller.guessPriority();
|
|
||||||
$httpBackend.flush();
|
|
||||||
|
|
||||||
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Order changed');
|
|
||||||
expect(controller.$.model.refresh).toHaveBeenCalledWith();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('onDrop()', () => {
|
describe('onDrop()', () => {
|
||||||
it('should call the insert method when dragging a ticket number', () => {
|
it('should call the insert method when dragging a ticket number', () => {
|
||||||
jest.spyOn(controller, 'insert');
|
jest.spyOn(controller, 'insert');
|
||||||
|
|
Loading…
Reference in New Issue