mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-191] fix item-access-control component test
This commit is contained in:
@@ -1,16 +1,43 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { ItemAccessControlComponent } from './item-access-control.component';
|
import { ItemAccessControlComponent } from './item-access-control.component';
|
||||||
|
import { of } from 'rxjs';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import {
|
||||||
|
AccessControlFormContainerComponent
|
||||||
|
} from '../../../shared/access-control-form-container/access-control-form-container.component';
|
||||||
|
|
||||||
// TODO: enable this test suite and fix it
|
describe('ItemAccessControlComponent', () => {
|
||||||
xdescribe('ItemAccessControlComponent', () => {
|
|
||||||
let component: ItemAccessControlComponent;
|
let component: ItemAccessControlComponent;
|
||||||
let fixture: ComponentFixture<ItemAccessControlComponent>;
|
let fixture: ComponentFixture<ItemAccessControlComponent>;
|
||||||
|
let routeStub = {
|
||||||
|
parent: {
|
||||||
|
parent: {
|
||||||
|
data: {
|
||||||
|
pipe: () => {
|
||||||
|
return {
|
||||||
|
pipe: () => {
|
||||||
|
return of({});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [ItemAccessControlComponent]
|
imports: [ItemAccessControlComponent],
|
||||||
|
providers: [{
|
||||||
|
provide: ActivatedRoute, useValue: routeStub
|
||||||
|
}]
|
||||||
})
|
})
|
||||||
|
.overrideComponent(ItemAccessControlComponent, {
|
||||||
|
remove: {
|
||||||
|
imports: [AccessControlFormContainerComponent]
|
||||||
|
}
|
||||||
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user