mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
[CST-4499] Version history - Test version-history-data.service
This commit is contained in:
@@ -6,11 +6,11 @@ import { NotificationsServiceStub } from '../../shared/testing/notifications-ser
|
||||
import { HALEndpointServiceStub } from '../../shared/testing/hal-endpoint-service.stub';
|
||||
import { getMockRequestService } from '../../shared/mocks/request.service.mock';
|
||||
import { VersionDataService } from './version-data.service';
|
||||
import { waitForAsync } from '@angular/core/testing';
|
||||
import { fakeAsync, waitForAsync } from '@angular/core/testing';
|
||||
|
||||
const url = 'fake-url';
|
||||
|
||||
fdescribe('VersionHistoryDataService', () => {
|
||||
describe('VersionHistoryDataService', () => {
|
||||
let service: VersionHistoryDataService;
|
||||
|
||||
let requestService: RequestService;
|
||||
@@ -45,7 +45,8 @@ fdescribe('VersionHistoryDataService', () => {
|
||||
function createService(requestEntry$?) {
|
||||
requestService = getMockRequestService(requestEntry$);
|
||||
rdbService = jasmine.createSpyObj('rdbService', {
|
||||
buildList: jasmine.createSpy('buildList')
|
||||
buildList: jasmine.createSpy('buildList'),
|
||||
buildFromRequestUUID: jasmine.createSpy('buildFromRequestUUID'),
|
||||
});
|
||||
objectCache = jasmine.createSpyObj('objectCache', {
|
||||
remove: jasmine.createSpy('remove')
|
||||
@@ -91,4 +92,13 @@ fdescribe('VersionHistoryDataService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// TODO complete test
|
||||
xdescribe('when a new version is created', () => {
|
||||
it('it should ...', fakeAsync(() => {
|
||||
spyOn(halService, 'getEndpoint');
|
||||
service.createVersion('item-href', 'version-summary');
|
||||
expect(halService.getEndpoint).toHaveBeenCalled();
|
||||
}));
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user