diff --git a/modules/route/front/index/index.spec.js b/modules/route/front/index/index.spec.js index 80e660b76..37386bc38 100644 --- a/modules/route/front/index/index.spec.js +++ b/modules/route/front/index/index.spec.js @@ -12,7 +12,7 @@ describe('Component vnRouteIndex', () => { const $element = angular.element(''); controller = $componentController('vnRouteIndex', {$element}); controller.$.model = crudModel; - controller.$.model.data = [{id: 1}, {id: 2}, {id: 3}]; + controller.$.model.data = [{id: 1, checked: true}, {id: 2}, {id: 3}]; })); describe('checked() getter', () => { @@ -148,4 +148,13 @@ describe('Component vnRouteIndex', () => { expect(controller.$.model.refresh).toHaveBeenCalledWith(); }); }); + + describe('markAsServed()', () => { + it('should perform a HTTP patch query', () => { + const data = {isOk: true}; + $httpBackend.expect('PATCH', `Routes/1`, data).respond(); + controller.markAsServed(); + $httpBackend.flush(); + }); + }); });