Chore: Auth Guard converted to CanActivateFn
This commit is contained in:
1 parent
a095ede3de
commit
b6bb3dbcfd
43 files changed
+231
-398
No files matched your search
@@ -1,15 +1,17 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { CanActivateFn } from '@angular/router';
|
||||
|
||||
import { AuthGuard } from './auth-guard.service';
|
||||
import { authGuard } from './auth-guard.service';
|
||||
|
||||
describe('authGuard', () => {
|
||||
const executeGuard: CanActivateFn = (...guardParameters) =>
|
||||
TestBed.runInInjectionContext(() => authGuard(...guardParameters));
|
||||
|
||||
describe('AuthGuard', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [AuthGuard],
|
||||
});
|
||||
TestBed.configureTestingModule({});
|
||||
});
|
||||
|
||||
it('should be created', inject([AuthGuard], (service: AuthGuard) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
it('should be created', () => {
|
||||
expect(executeGuard).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user