|
1 | | -import { APP_BASE_HREF } from '@angular/common'; |
2 | | -import { HttpClientTestingModule } from '@angular/common/http/testing'; |
| 1 | +import { provideHttpClientTesting } from '@angular/common/http/testing'; |
| 2 | +import { provideHttpClient } from '@angular/common/http'; |
3 | 3 | import { Component } from '@angular/core'; |
4 | | -import { provideRouter, Route, Router, RouterModule } from '@angular/router'; |
| 4 | +import { provideRouter, Route, Router } from '@angular/router'; |
5 | 5 | import { createSpyObject, SpyObject } from '@ngneat/spectator/jest'; |
6 | 6 | import { of } from 'rxjs'; |
7 | 7 | import { permissionGuard } from '../guards/permission.guard'; |
8 | 8 | import { HttpErrorReporterService } from '../services/http-error-reporter.service'; |
9 | 9 | import { PermissionService } from '../services/permission.service'; |
10 | | -import { RoutesService } from '../services/routes.service'; |
11 | | -import { CORE_OPTIONS } from '../tokens/options.token'; |
12 | | -import { IncludeLocalizationResourcesProvider, provideAbpCore, withOptions } from '../providers'; |
| 10 | +import { provideAbpCore, withOptions } from '../providers'; |
13 | 11 | import { TestBed } from '@angular/core/testing'; |
14 | 12 | import { RouterTestingHarness } from '@angular/router/testing'; |
15 | | -import { OTHERS_GROUP } from '../tokens'; |
16 | | -import { SORT_COMPARE_FUNC, compareFuncFactory } from '../tokens/compare-func.token'; |
17 | 13 | import { AuthService } from '../abstracts'; |
18 | 14 |
|
19 | 15 | @Component({ template: '' }) |
@@ -50,8 +46,9 @@ describe('authGuard', () => { |
50 | 46 | permissionService = createSpyObject(PermissionService); |
51 | 47 |
|
52 | 48 | TestBed.configureTestingModule({ |
53 | | - imports: [HttpClientTestingModule], |
54 | 49 | providers: [ |
| 50 | + provideHttpClient(), |
| 51 | + provideHttpClientTesting(), |
55 | 52 | { provide: AuthService, useValue: mockOAuthService }, |
56 | 53 | { provide: PermissionService, useValue: permissionService }, |
57 | 54 | { provide: HttpErrorReporterService, useValue: httpErrorReporter }, |
|
0 commit comments