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))
|
||||
.map((response: any) => {
|
||||
return {type: this.TYPE, ticket: response.entry.id};
|
||||
return {type: this.TYPE, ticket: response};
|
||||
})
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
@ -33,12 +33,9 @@ describe('AlfrescoAuthentication', () => {
|
||||
service;
|
||||
|
||||
fakePromiseECM = new Promise(function (resolve, reject) {
|
||||
resolve({
|
||||
entry: {
|
||||
userId: 'fake-username',
|
||||
id: 'fake-post-ticket-ECM'
|
||||
}
|
||||
});
|
||||
resolve(
|
||||
'fake-post-ticket-ECM'
|
||||
);
|
||||
reject({
|
||||
response: {
|
||||
error: 'fake-error'
|
||||
|
Loading…
x
Reference in New Issue
Block a user