mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-18267] change unit test setup for auth service (#9216)
* [AAE-18267] change unit test setup for auth service * [AAE-18267] remove exclude * [AAE-18267] removed CoreTestingModule from imports
This commit is contained in:
committed by
Vito Albano
parent
97c3e38b2a
commit
f4f2d055cf
@@ -19,29 +19,42 @@ import { fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
import { CookieService } from '../../common/services/cookie.service';
|
||||
import { AppConfigService } from '../../app-config/app-config.service';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { BasicAlfrescoAuthService } from '../basic-auth/basic-alfresco-auth.service';
|
||||
import { OidcAuthenticationService } from './oidc-authentication.service';
|
||||
import { AuthModule } from '../oidc/auth.module';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { CookieServiceMock } from '../../mock';
|
||||
import { AppConfigServiceMock } from '../../common';
|
||||
|
||||
declare let jasmine: any;
|
||||
// eslint-disable-next-line
|
||||
xdescribe('AuthenticationService', () => {
|
||||
|
||||
describe('AuthenticationService', () => {
|
||||
let authService: AuthenticationService;
|
||||
let basicAlfrescoAuthService: BasicAlfrescoAuthService;
|
||||
let appConfigService: AppConfigService;
|
||||
let cookie: CookieService;
|
||||
let oidcAuthenticationService: OidcAuthenticationService;
|
||||
|
||||
setupTestBed({
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreTestingModule
|
||||
AuthModule.forRoot({ useHash: true }),
|
||||
HttpClientModule
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: CookieService,
|
||||
useClass: CookieServiceMock
|
||||
},
|
||||
{
|
||||
provide: AppConfigService,
|
||||
useClass: AppConfigServiceMock
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
sessionStorage.clear();
|
||||
localStorage.clear();
|
||||
authService = TestBed.inject(AuthenticationService);
|
||||
|
Reference in New Issue
Block a user