mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Clear cache in mydspace redirect and reload methods.
This commit is contained in:
@@ -12,6 +12,10 @@ import { ItemActionsComponent } from './item-actions.component';
|
||||
import { ItemDataService } from '../../../core/data/item-data.service';
|
||||
import { NotificationsService } from '../../notifications/notifications.service';
|
||||
import { NotificationsServiceStub } from '../../testing/notifications-service-stub';
|
||||
import { SearchService } from '../../../+search-page/search-service/search.service';
|
||||
import { RequestService } from '../../../core/data/request.service';
|
||||
import { getMockSearchService } from '../../mocks/mock-search-service';
|
||||
import { getMockRequestService } from '../../mocks/mock-request.service';
|
||||
|
||||
let component: ItemActionsComponent;
|
||||
let fixture: ComponentFixture<ItemActionsComponent>;
|
||||
@@ -50,6 +54,10 @@ mockObject = Object.assign(new Item(), {
|
||||
}
|
||||
});
|
||||
|
||||
const searchService = getMockSearchService()
|
||||
|
||||
const requestServce = getMockRequestService();
|
||||
|
||||
describe('ItemActionsComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -67,6 +75,8 @@ describe('ItemActionsComponent', () => {
|
||||
{ provide: Router, useValue: new RouterStub() },
|
||||
{ provide: ItemDataService, useValue: mockDataService },
|
||||
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
|
||||
{ provide: SearchService, useValue: searchService },
|
||||
{ provide: RequestService, useValue: requestServce }
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
}).overrideComponent(ItemActionsComponent, {
|
||||
|
Reference in New Issue
Block a user