mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-14 00:26:21 +00:00
Chore: update to Angular v18 (#7106)
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
import { TestBed } from '@angular/core/testing'
|
||||
import { CustomDatePipe } from './custom-date.pipe'
|
||||
import { SettingsService } from '../services/settings.service'
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing'
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing'
|
||||
import { DatePipe } from '@angular/common'
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
|
||||
|
||||
describe('CustomDatePipe', () => {
|
||||
let datePipe: CustomDatePipe
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [CustomDatePipe, SettingsService, DatePipe],
|
||||
imports: [HttpClientTestingModule],
|
||||
imports: [],
|
||||
providers: [
|
||||
CustomDatePipe,
|
||||
SettingsService,
|
||||
DatePipe,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
],
|
||||
})
|
||||
|
||||
datePipe = TestBed.inject(CustomDatePipe)
|
||||
|
@@ -1,12 +1,13 @@
|
||||
import { TestBed } from '@angular/core/testing'
|
||||
import { UsernamePipe } from './username.pipe'
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
provideHttpClientTesting,
|
||||
} from '@angular/common/http/testing'
|
||||
import { environment } from 'src/environments/environment'
|
||||
import { PermissionsService } from '../services/permissions.service'
|
||||
import { UserService } from '../services/rest/user.service'
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
|
||||
|
||||
describe('UsernamePipe', () => {
|
||||
let pipe: UsernamePipe
|
||||
@@ -15,8 +16,13 @@ describe('UsernamePipe', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [UsernamePipe, PermissionsService],
|
||||
imports: [HttpClientTestingModule],
|
||||
imports: [],
|
||||
providers: [
|
||||
UsernamePipe,
|
||||
PermissionsService,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
],
|
||||
})
|
||||
|
||||
httpTestingController = TestBed.inject(HttpTestingController)
|
||||
|
Reference in New Issue
Block a user