mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
fix unit test response auth problem
This commit is contained in:
parent
1d3cf1330d
commit
68bc0c7949
@ -72,7 +72,7 @@ export class AlfrescoAuthenticationECM extends AlfrescoAuthenticationBase implem
|
|||||||
|
|
||||||
return Observable.fromPromise(this.callApiLogin(username, password))
|
return Observable.fromPromise(this.callApiLogin(username, password))
|
||||||
.map((response: any) => {
|
.map((response: any) => {
|
||||||
return {type: this.TYPE, ticket: response.entry.id};
|
return {type: this.TYPE, ticket: response};
|
||||||
})
|
})
|
||||||
.catch(this.handleError);
|
.catch(this.handleError);
|
||||||
}
|
}
|
||||||
|
@ -33,12 +33,9 @@ describe('AlfrescoAuthentication', () => {
|
|||||||
service;
|
service;
|
||||||
|
|
||||||
fakePromiseECM = new Promise(function (resolve, reject) {
|
fakePromiseECM = new Promise(function (resolve, reject) {
|
||||||
resolve({
|
resolve(
|
||||||
entry: {
|
'fake-post-ticket-ECM'
|
||||||
userId: 'fake-username',
|
);
|
||||||
id: 'fake-post-ticket-ECM'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
reject({
|
reject({
|
||||||
response: {
|
response: {
|
||||||
error: 'fake-error'
|
error: 'fake-error'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user