Fixing default tests

This commit is contained in:
Art
2021-09-17 15:50:57 +03:00
parent 26d823d486
commit 1b62198edb
3 changed files with 26 additions and 3 deletions

View File

@ -1,12 +1,24 @@
import {TestBed} from '@angular/core/testing';
import {AuthenticationGuard} from './authentication.guard';
import {HttpClient} from "@angular/common/http";
import {NotificationModule} from "../notification/notification.module";
import {RouterTestingModule} from "@angular/router/testing";
describe('AuthenticationGuard', () => {
let guard: AuthenticationGuard;
beforeEach(() => {
TestBed.configureTestingModule({});
let httpClientSpy = jasmine.createSpyObj('HttpClient', ['']);
TestBed.configureTestingModule({
imports: [NotificationModule, RouterTestingModule.withRoutes([])],
providers: [
{provide: HttpClient, useValue: httpClientSpy}
]
});
guard = TestBed.inject(AuthenticationGuard);
});