mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 02:54:13 +00:00
Fixed tests
This commit is contained in:
@@ -7,7 +7,7 @@ import { Component } from '@angular/core';
|
||||
import { SearchService } from './search.service';
|
||||
import { ItemDataService } from './../../core/data/item-data.service';
|
||||
import { ViewMode } from '../../+search-page/search-options.model';
|
||||
import { RouteService } from '../../shared/route.service';
|
||||
import { RouteService } from '../../shared/services/route.service';
|
||||
import { GLOBAL_CONFIG } from '../../../config';
|
||||
import { RemoteDataBuildService } from '../../core/cache/builders/remote-data-build.service';
|
||||
import { ActivatedRoute, Router, UrlTree } from '@angular/router';
|
||||
|
@@ -26,12 +26,14 @@ import { HostWindowResizeAction } from './shared/host-window.actions';
|
||||
import { MetadataService } from './core/metadata/metadata.service';
|
||||
|
||||
import { GLOBAL_CONFIG, ENV_CONFIG } from '../config';
|
||||
import { NativeWindowRef, NativeWindowService } from './shared/window.service';
|
||||
import { NativeWindowRef, NativeWindowService } from './shared/services/window.service';
|
||||
|
||||
import { MockTranslateLoader } from './shared/mocks/mock-translate-loader';
|
||||
import { MockMetadataService } from './shared/mocks/mock-metadata-service';
|
||||
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
|
||||
import { AngularticsMock } from './shared/mocks/mock-angulartics.service';
|
||||
import { AuthServiceMock } from './shared/mocks/mock-auth.service';
|
||||
import { AuthService } from './core/auth/auth.service';
|
||||
|
||||
let comp: AppComponent;
|
||||
let fixture: ComponentFixture<AppComponent>;
|
||||
@@ -59,6 +61,7 @@ describe('App component', () => {
|
||||
{ provide: NativeWindowService, useValue: new NativeWindowRef() },
|
||||
{ provide: MetadataService, useValue: new MockMetadataService() },
|
||||
{ provide: Angulartics2GoogleAnalytics, useValue: new AngularticsMock() },
|
||||
{ provide: AuthService, useValue: new AuthServiceMock() },
|
||||
AppComponent
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
|
6
src/app/shared/mocks/mock-auth.service.ts
Normal file
6
src/app/shared/mocks/mock-auth.service.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable:no-empty */
|
||||
export class AuthServiceMock {
|
||||
public checksAuthenticationToken() {
|
||||
return
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user