mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[AAE-12501] Fix Core unit tests that weren't executed because of the previous test.ts wrong location
This commit is contained in:
@@ -48,6 +48,7 @@ describe('AuthenticationInterceptor', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should call add auth token method when SHOULD_ADD_AUTH_TOKEN context is set to true', () => {
|
it('should call add auth token method when SHOULD_ADD_AUTH_TOKEN context is set to true', () => {
|
||||||
|
addTokenToHeaderSpy.and.callThrough();
|
||||||
request.context.set(SHOULD_ADD_AUTH_TOKEN, true);
|
request.context.set(SHOULD_ADD_AUTH_TOKEN, true);
|
||||||
interceptor.intercept(request, mockNext);
|
interceptor.intercept(request, mockNext);
|
||||||
expect(addTokenToHeaderSpy).toHaveBeenCalled();
|
expect(addTokenToHeaderSpy).toHaveBeenCalled();
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { ShellAppService, SHELL_APP_SERVICE } from '../../services/shell-app.service';
|
import { ShellAppService, SHELL_APP_SERVICE } from '../../services/shell-app.service';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
class MockRouter {
|
class MockRouter {
|
||||||
private url = 'some-url';
|
private url = 'some-url';
|
||||||
@@ -57,7 +58,15 @@ describe('AppLayoutComponent', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, NoopAnimationsModule, HttpClientModule, SidenavLayoutModule, ExtensionsModule, RouterModule.forChild([])],
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
NoopAnimationsModule,
|
||||||
|
HttpClientModule,
|
||||||
|
SidenavLayoutModule,
|
||||||
|
ExtensionsModule,
|
||||||
|
RouterModule.forChild([]),
|
||||||
|
TranslateModule.forRoot()
|
||||||
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: Router,
|
provide: Router,
|
||||||
|
|||||||
Reference in New Issue
Block a user