mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Extended ShlinkApiClient test covering editDomainRedirects
This commit is contained in:
parent
dce1cefd49
commit
d88f822125
1 changed files with 13 additions and 0 deletions
|
@ -297,4 +297,17 @@ describe('ShlinkApiClient', () => {
|
|||
expect(result).toEqual(expectedData);
|
||||
});
|
||||
});
|
||||
|
||||
describe('editDomainRedirects', () => {
|
||||
it('returns the redirects', async () => {
|
||||
const resp = { baseUrlRedirect: null, regular404Redirect: 'foo', invalidShortUrlRedirect: 'bar' };
|
||||
const axiosSpy = createAxiosMock({ data: resp });
|
||||
const { editDomainRedirects } = new ShlinkApiClient(axiosSpy, '', '');
|
||||
|
||||
const result = await editDomainRedirects({ domain: 'foo' });
|
||||
|
||||
expect(axiosSpy).toHaveBeenCalled();
|
||||
expect(result).toEqual(resp);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue