mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
fix bitstream list item test
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import {CommonModule} from '@angular/common';
|
||||||
|
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
import {RouterTestingModule} from '@angular/router/testing';
|
||||||
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
|
import {SharedModule} from '../../shared.module';
|
||||||
|
|
||||||
import { BitstreamListItemComponent } from './bitstream-list-item.component';
|
import {BitstreamListItemComponent} from './bitstream-list-item.component';
|
||||||
|
import {DSONameService} from '../../../core/breadcrumbs/dso-name.service';
|
||||||
|
import {DSONameServiceMock} from '../../mocks/dso-name.service.mock';
|
||||||
|
|
||||||
describe('BitstreamListItemComponent', () => {
|
describe('BitstreamListItemComponent', () => {
|
||||||
let component: BitstreamListItemComponent;
|
let component: BitstreamListItemComponent;
|
||||||
@@ -8,7 +14,9 @@ describe('BitstreamListItemComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ BitstreamListItemComponent ]
|
declarations: [ BitstreamListItemComponent ],
|
||||||
|
imports: [ CommonModule, SharedModule, TranslateModule, RouterTestingModule ],
|
||||||
|
providers: [{ provide: DSONameService, useValue: new DSONameServiceMock() }]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
});
|
});
|
||||||
@@ -16,6 +24,8 @@ describe('BitstreamListItemComponent', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(BitstreamListItemComponent);
|
fixture = TestBed.createComponent(BitstreamListItemComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
// @ts-ignore
|
||||||
|
component.object = {name: 'test'};
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user