Commit d06f350d authored by Clement Ho's avatar Clement Ho

Add sidebar assignee service

parent 17a532a7
import SidebarAssigneesService from '~/vue_sidebar_assignees/services/sidebar_assignees_service';
describe('SidebarAssigneesService', () => {
let service;
beforeEach(() => {
service = new SidebarAssigneesService('', 'field');
});
describe('constructor', () => {
it('should save field', () => {
expect(service.field).toEqual('field');
});
it('should save sidebarAssigneeResource', () => {
expect(service.sidebarAssigneeResource).toBeDefined();
});
});
describe('update', () => {
it('should call vue resource update', (done) => {
const userIds = [1, 2, 3];
spyOn(service.sidebarAssigneeResource, 'update').and.callFake((o) => {
expect(o.field).toEqual(userIds);
done();
});
service.update(userIds);
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment