mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
[CST-4499] Version history - Old tests fixed
This commit is contained in:
@@ -11,6 +11,7 @@ import { VersionDataService } from '../../../core/data/version-data.service';
|
|||||||
import { AuthService } from '../../../core/auth/auth.service';
|
import { AuthService } from '../../../core/auth/auth.service';
|
||||||
import { Version } from '../../../core/shared/version.model';
|
import { Version } from '../../../core/shared/version.model';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
const mockItem: Item = Object.assign(new Item(), {
|
const mockItem: Item = Object.assign(new Item(), {
|
||||||
bundles: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
bundles: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||||
@@ -24,6 +25,9 @@ const mockVersion: Version = Object.assign(new Version(), {
|
|||||||
version: 1,
|
version: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@Component({ template: '' })
|
||||||
|
class DummyComponent {
|
||||||
|
}
|
||||||
|
|
||||||
describe('VersionPageComponent', () => {
|
describe('VersionPageComponent', () => {
|
||||||
let component: VersionPageComponent;
|
let component: VersionPageComponent;
|
||||||
@@ -40,8 +44,8 @@ describe('VersionPageComponent', () => {
|
|||||||
setRedirectUrl: {}
|
setRedirectUrl: {}
|
||||||
});
|
});
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [VersionPageComponent],
|
declarations: [VersionPageComponent, DummyComponent],
|
||||||
imports: [RouterTestingModule.withRoutes([])],
|
imports: [RouterTestingModule.withRoutes([{ path: 'items/item-uuid', component: DummyComponent, pathMatch: 'full' }])],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: mockRoute },
|
{ provide: ActivatedRoute, useValue: mockRoute },
|
||||||
{ provide: VersionDataService, useValue: {} },
|
{ provide: VersionDataService, useValue: {} },
|
||||||
|
Reference in New Issue
Block a user