mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
committed by
Denys Vuika
parent
c5dca890b7
commit
9fb085eb3a
@@ -18,6 +18,8 @@
|
||||
import { ReflectiveInjector } from '@angular/core';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { RenditionsService } from './renditions.service';
|
||||
import { SettingsService } from './settings.service';
|
||||
import { StorageService } from './storage.service';
|
||||
import { LogService } from './log.service';
|
||||
import { fakeRedition, fakeReditionCreated, fakeReditionsList } from '../assets/renditionsService.mock';
|
||||
|
||||
@@ -31,6 +33,8 @@ describe('RenditionsService', () => {
|
||||
injector = ReflectiveInjector.resolveAndCreate([
|
||||
AlfrescoApiService,
|
||||
RenditionsService,
|
||||
SettingsService,
|
||||
StorageService,
|
||||
LogService
|
||||
]);
|
||||
});
|
||||
@@ -38,7 +42,6 @@ describe('RenditionsService', () => {
|
||||
beforeEach(() => {
|
||||
jasmine.Ajax.install();
|
||||
service = injector.get(RenditionsService);
|
||||
service.apiService.setInstance(new AlfrescoApi({}));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -60,7 +63,7 @@ describe('RenditionsService', () => {
|
||||
|
||||
it('Create redition service should call the server with the ID passed and the asked encoding', (done) => {
|
||||
service.createRendition('fake-node-id', 'pdf').subscribe((res) => {
|
||||
expect(jasmine.Ajax.requests.mostRecent().url).toBe('http://127.0.0.1:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/fake-node-id/renditions');
|
||||
expect(jasmine.Ajax.requests.mostRecent().url).toBe('http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/fake-node-id/renditions');
|
||||
done();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user