Commit 84629f73 authored by Kushal Pandya's avatar Kushal Pandya

Roadmap App Service

parent 986133cd
import axios from '~/lib/utils/axios_utils';
export default class RoadmapService {
constructor(epicsPath) {
this.epicsPath = epicsPath;
}
getEpics() {
return axios.get(this.epicsPath);
}
}
import axios from '~/lib/utils/axios_utils';
import RoadmapService from 'ee/roadmap/service/roadmap_service';
import { epicsPath } from '../mock_data';
describe('RoadmapService', () => {
let service;
beforeEach(() => {
service = new RoadmapService(epicsPath);
});
describe('getEpics', () => {
it('returns axios instance for Epics path', () => {
spyOn(axios, 'get').and.stub();
service.getEpics();
expect(axios.get).toHaveBeenCalledWith(service.epicsPath);
});
});
});
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