mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Second attempt to fix menu.resolver.spec.ts
This commit is contained in:
@@ -19,6 +19,8 @@ import { cold } from 'jasmine-marbles';
|
|||||||
import createSpy = jasmine.createSpy;
|
import createSpy = jasmine.createSpy;
|
||||||
import { createSuccessfulRemoteDataObject$ } from './shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from './shared/remote-data.utils';
|
||||||
import { createPaginatedList } from './shared/testing/utils.test';
|
import { createPaginatedList } from './shared/testing/utils.test';
|
||||||
|
import { ConfigurationDataService } from './core/data/configuration-data.service';
|
||||||
|
import { ConfigurationDataServiceStub } from './shared/testing/configuration-data.service.stub';
|
||||||
|
|
||||||
const BOOLEAN = { t: true, f: false };
|
const BOOLEAN = { t: true, f: false };
|
||||||
const MENU_STATE = {
|
const MENU_STATE = {
|
||||||
@@ -37,6 +39,7 @@ describe('MenuResolver', () => {
|
|||||||
let browseService;
|
let browseService;
|
||||||
let authorizationService;
|
let authorizationService;
|
||||||
let scriptService;
|
let scriptService;
|
||||||
|
let configurationDataService;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
menuService = new MenuServiceStub();
|
menuService = new MenuServiceStub();
|
||||||
@@ -53,6 +56,9 @@ describe('MenuResolver', () => {
|
|||||||
scriptWithNameExistsAndCanExecute: observableOf(true)
|
scriptWithNameExistsAndCanExecute: observableOf(true)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
configurationDataService = new ConfigurationDataServiceStub();
|
||||||
|
spyOn(configurationDataService, 'findByPropertyName').and.returnValue(observableOf(true));
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule],
|
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule],
|
||||||
declarations: [AdminSidebarComponent],
|
declarations: [AdminSidebarComponent],
|
||||||
@@ -61,6 +67,7 @@ describe('MenuResolver', () => {
|
|||||||
{ provide: BrowseService, useValue: browseService },
|
{ provide: BrowseService, useValue: browseService },
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||||
{ provide: ScriptDataService, useValue: scriptService },
|
{ provide: ScriptDataService, useValue: scriptService },
|
||||||
|
{ provide: ConfigurationDataService, useValue: configurationDataService },
|
||||||
{
|
{
|
||||||
provide: NgbModal, useValue: {
|
provide: NgbModal, useValue: {
|
||||||
open: () => {/*comment*/
|
open: () => {/*comment*/
|
||||||
|
Reference in New Issue
Block a user