API/test: Remove getVersion() Axios call

This removes `getVersion()` API call previously used in Axios.
This commit is contained in:
regexowl 2023-12-14 11:10:27 +01:00 committed by Lucas Garfield
parent 27ebbdb24a
commit 850e77eb01
2 changed files with 0 additions and 9 deletions

View file

@ -37,16 +37,9 @@ async function getPackagesContentSources(repoUrls, search) {
return packages;
}
async function getVersion() {
const path = '/version';
const request = await axios.get(IMAGE_BUILDER_API.concat(path));
return request.data;
}
const apiCalls = {
getPackages,
getPackagesContentSources,
getVersion,
};
export default apiCalls;

View file

@ -24,8 +24,6 @@ describe('Landing Page', () => {
test('renders page heading', async () => {
renderWithReduxRouter('', {});
const composeImage = jest.spyOn(api, 'getVersion');
composeImage.mockResolvedValue({ version: '1.0' });
// check heading
screen.getByRole('heading', { name: /Image Builder/i });
});