mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
AAE-30882 Change buildRequest parameters
This commit is contained in:
@@ -99,15 +99,17 @@ describe('SuperagentHttpClient', () => {
|
||||
const httpMethod = 'GET';
|
||||
const securityOptions = { ...defaultSecurityOptions };
|
||||
|
||||
const request = client['buildRequest']({
|
||||
...options,
|
||||
path: '',
|
||||
httpMethod,
|
||||
url,
|
||||
bodyParam: null,
|
||||
returnType: null,
|
||||
const request = client['buildRequest'](
|
||||
{
|
||||
...options,
|
||||
path: '',
|
||||
httpMethod,
|
||||
url,
|
||||
bodyParam: null,
|
||||
returnType: null
|
||||
},
|
||||
securityOptions
|
||||
});
|
||||
);
|
||||
|
||||
expect(request.urlWithParams).toEqual(url);
|
||||
const { fetchOptions } = request;
|
||||
@@ -129,15 +131,17 @@ describe('SuperagentHttpClient', () => {
|
||||
|
||||
(isBrowser as jest.Mock).mockReturnValue(false);
|
||||
|
||||
const request = client['buildRequest']({
|
||||
...options,
|
||||
path: '',
|
||||
httpMethod,
|
||||
url,
|
||||
bodyParam: null,
|
||||
returnType: null,
|
||||
const request = client['buildRequest'](
|
||||
{
|
||||
...options,
|
||||
path: '',
|
||||
httpMethod,
|
||||
url,
|
||||
bodyParam: null,
|
||||
returnType: null
|
||||
},
|
||||
securityOptions
|
||||
});
|
||||
);
|
||||
expect(request.fetchOptions.headers['cookie']).toEqual('testCookie');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user