Commit 5ec04aa0 authored by Kushal Pandya's avatar Kushal Pandya

Geo Nodes Service tests

parent 6df41d3a
import axios from '~/lib/utils/axios_utils';
import GeoNodesService from 'ee/geo_nodes/service/geo_nodes_service';
import { NODE_DETAILS_PATH } from '../mock_data';
describe('GeoNodesService', () => {
let service;
beforeEach(() => {
service = new GeoNodesService(NODE_DETAILS_PATH);
});
describe('getGeoNodes', () => {
it('returns axios instance for Geo nodes path', () => {
spyOn(axios, 'get').and.stub();
service.getGeoNodes();
expect(axios.get).toHaveBeenCalledWith(service.geoNodesPath);
});
});
describe('getGeoNodeDetails', () => {
it('returns axios instance for Geo node details path', () => {
spyOn(axios, 'get').and.stub();
service.getGeoNodeDetails(2);
expect(axios.get).toHaveBeenCalled();
});
});
});
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