fix tests

This commit is contained in:
Mario Romano 2016-09-06 16:22:30 +01:00
parent f9210ba048
commit 3e0fd310c5
3 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ describe('DocumentListService', () => {
service.getFolder('fake-node-id').subscribe(e => {
expect(jasmine.Ajax.requests.mostRecent().url)
.toBe('http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/' +
'children?include=path&relativePath=fake-node-id');
'children?include=path%2Cproperties&relativePath=fake-node-id');
expect(jasmine.Ajax.requests.mostRecent().method)
.toBe('GET');
done();
@ -116,7 +116,7 @@ describe('DocumentListService', () => {
service.getFolder('fake-node-id', {maxItems: 10}).subscribe(e => {
expect(jasmine.Ajax.requests.mostRecent().url)
.toBe('http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/' +
'children?maxItems=10&include=path&relativePath=fake-node-id');
'children?maxItems=10&include=path%2Cproperties&relativePath=fake-node-id');
expect(jasmine.Ajax.requests.mostRecent().method)
.toBe('GET');
done();

View File

@ -69,7 +69,7 @@ export class DocumentListService {
let nodeId = '-root-';
let params: any = {
relativePath: folder,
include: ['path','properties']
include: ['path', 'properties']
};
if (opts) {

View File

@ -353,7 +353,7 @@ describe('AlfrescoLogin', () => {
expect(component.success).toBe(true);
expect(compiled.querySelector('#login-success')).toBeDefined();
expect(compiled.querySelector('#login-success').innerHTML).toEqual('LOGIN.MESSAGES.LOGIN-SUCCESS');
expect(component.onSuccess.emit).toHaveBeenCalledWith(true);
expect(component.onSuccess.emit).toHaveBeenCalledWith({ token: true, username: 'fake-username', password: 'fake-password' });
});
it('should emit onError event after the login has failed', () => {