mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fixing unit test
This commit is contained in:
@@ -41,8 +41,7 @@ describe('LibraryFavoriteDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule, TestComponent],
|
||||
declarations: [LibraryFavoriteDirective]
|
||||
imports: [HttpClientTestingModule, TestComponent, LibraryFavoriteDirective]
|
||||
});
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AboutServerSettingsComponent } from './about-server-settings.component';
|
||||
import { AppConfigService } from '../../app-config/app-config.service';
|
||||
import { aboutGithubDetails } from '../about.mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { AppConfigServiceMock } from '../../common';
|
||||
|
@@ -50,4 +50,8 @@ export class AuthenticationMock extends AuthenticationService {
|
||||
|
||||
return throwError('Fake server error');
|
||||
}
|
||||
|
||||
logout(): Observable<any> {
|
||||
return of({});
|
||||
}
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ import { HttpClientModule } from '@angular/common/http';
|
||||
import { directionalityConfigFactory } from '../common/services/directionality-config-factory';
|
||||
import { DirectionalityConfigService } from '../common/services/directionality-config.service';
|
||||
import { AuthModule, RedirectAuthService } from '../auth';
|
||||
import { EMPTY } from 'rxjs';
|
||||
import { EMPTY, of } from 'rxjs';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -56,7 +56,7 @@ import { EMPTY } from 'rxjs';
|
||||
deps: [DirectionalityConfigService],
|
||||
multi: true
|
||||
},
|
||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, init: () => {} } }
|
||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, init: () => {}, onTokenReceived: of() } }
|
||||
],
|
||||
exports: [NoopAnimationsModule, CoreModule, TranslateModule, RouterTestingModule]
|
||||
})
|
||||
|
Reference in New Issue
Block a user