mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 13:06:22 +00:00
Improved how tags are exposed by the ApiClient when listing tags
This commit is contained in:
@@ -103,7 +103,7 @@ describe('tagsListReducer', () => {
|
||||
it('dispatches loaded lists when no error occurs', async () => {
|
||||
const tags = [ 'foo', 'bar', 'baz' ];
|
||||
|
||||
listTagsMock.mockResolvedValue({ data: tags, stats: [] });
|
||||
listTagsMock.mockResolvedValue({ tags, stats: [] });
|
||||
buildShlinkApiClient.mockReturnValue({ listTags: listTagsMock });
|
||||
|
||||
await listTags(buildShlinkApiClient, true)()(dispatch, getState);
|
||||
|
||||
@@ -141,7 +141,7 @@ describe('ShlinkApiClient', () => {
|
||||
|
||||
const result = await listTags();
|
||||
|
||||
expect({ data: expectedTags }).toEqual(result);
|
||||
expect({ tags: expectedTags }).toEqual(result);
|
||||
expect(axiosSpy).toHaveBeenCalledWith(expect.objectContaining({ url: '/tags', method: 'GET' }));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user