fix unit test response auth problem

This commit is contained in:
mauriziovitale84 2016-07-18 13:20:33 +01:00
parent 1d3cf1330d
commit 68bc0c7949
2 changed files with 4 additions and 7 deletions

View File

@ -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);
}

View File

@ -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'