Skip to content

Commit

Permalink
test: fix api test
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Dec 7, 2023
1 parent 830c991 commit 7a0a44c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/taxonomy/import-tags/data/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import { taxonomyImportMock } from '../__mocks__';
import {
getTaxonomyImportNewApiUrl,
getTagsImportApiUrl,
getTagsPlanImportApiUrl,
importNewTaxonomy,
planImportTags,
useImportTags,
} from './api';

Expand Down Expand Up @@ -60,4 +62,10 @@ describe('import taxonomy api calls', () => {
expect(axiosMock.history.put[0].url).toEqual(getTagsImportApiUrl(1));
});
});

it('should call plan import tags', async () => {
axiosMock.onPut(getTagsPlanImportApiUrl(1)).reply(200, { plan: 'plan' });
await planImportTags(1);
expect(axiosMock.history.put[0].url).toEqual(getTagsPlanImportApiUrl(1));
});
});

0 comments on commit 7a0a44c

Please sign in to comment.