mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[AAE-30882] - migrating from superagent to axios
This commit is contained in:
@@ -17,8 +17,9 @@
|
||||
|
||||
import assert from 'assert';
|
||||
import { ProcessAuth } from '../src';
|
||||
import { SuperagentHttpClient } from '../src/superagentHttpClient';
|
||||
|
||||
import { BpmAuthMock } from './mockObjects';
|
||||
import { AxiosHttpClient } from '../src/axiosHttpClient';
|
||||
|
||||
describe('Bpm Auth test', () => {
|
||||
const hostBpm = 'https://127.0.0.1:9999';
|
||||
@@ -256,16 +257,16 @@ describe('Bpm Auth test', () => {
|
||||
let setCsrfTokenCalled = false;
|
||||
|
||||
beforeEach(() => {
|
||||
originalMethod = SuperagentHttpClient.prototype.setCsrfToken;
|
||||
originalMethod = AxiosHttpClient.prototype.setCsrfToken;
|
||||
setCsrfTokenCalled = false;
|
||||
|
||||
SuperagentHttpClient.prototype.setCsrfToken = () => {
|
||||
AxiosHttpClient.prototype.setCsrfToken = () => {
|
||||
setCsrfTokenCalled = true;
|
||||
};
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
SuperagentHttpClient.prototype.setCsrfToken = originalMethod;
|
||||
AxiosHttpClient.prototype.setCsrfToken = originalMethod;
|
||||
setCsrfTokenCalled = false;
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user