Skip to content

Commit

Permalink
chore(NUM-2297): remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
axelsiebert committed Mar 22, 2024
1 parent 1c7b4f8 commit 3c1905f
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Routes, RouterModule } from '@angular/router'
import { AuthGuard } from './core/auth/guards/auth.guard'
import { RoleGuard } from './core/auth/guards/role.guard'
import { CanDeactivateSearchGuard } from './modules/search/can-deactivate-search.guard'
import { AvailableRoles, allRoles } from './shared/models/available-roles.enum'
import { AvailableRoles } from './shared/models/available-roles.enum'
import { UserManualUrlResolver } from './shared/resolvers/usermanualurl.resolver'

export const routes: Routes = [
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/auth/auth.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ describe('Auth Service', () => {

it('should call the api to create the user on the first call if its a token event', (done) => {
jest.spyOn(oauthService, 'loadUserProfile').mockResolvedValue(mockAuthProfile)
jest.spyOn(httpClient, 'post').mockImplementation((post) => {
jest.spyOn(httpClient, 'post').mockImplementation(() => {
expect(true).toBeTruthy()
done()
return of()
Expand Down
6 changes: 0 additions & 6 deletions src/app/core/auth/guards/auth.guard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ describe('AuthGuard', () => {
openToast: jest.fn(),
} as unknown as ToastMessageService

const mockToServiceUnapproved = {
openToast: jest.fn(),
userNotApproved: true,
} as unknown as ToastMessageService

beforeEach(() => {
guard = new AuthGuard(authService, mockProfileService, mockToastService)
})
Expand Down Expand Up @@ -81,7 +76,6 @@ describe('AuthGuard', () => {
})

describe('When the user is logged in and the route is restricted to approved users', () => {
const activatedRoute = {} as ActivatedRouteSnapshot
const route = {
data: {
onlyApprovedUsers: true,
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/interceptors/error.interceptor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpClient, HTTP_INTERCEPTORS, HttpErrorResponse } from '@angular/common/http'
import { HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http'
import { inject, TestBed } from '@angular/core/testing'
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'
import { ErrorInterceptor } from './error.interceptor'
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/admin/admin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { HttpClient, HttpErrorResponse } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { BehaviorSubject, Observable, of, throwError, forkJoin } from 'rxjs'
import { catchError, map, skip, switchMap, tap, throttleTime } from 'rxjs/operators'
import { catchError, map, skip, tap, throttleTime } from 'rxjs/operators'
import { AppConfigService } from 'src/app/config/app-config.service'
import { IOrganization } from 'src/app/shared/models/organization/organization.interface'
import { IRole } from 'src/app/shared/models/user/role.interface'
Expand Down
7 changes: 0 additions & 7 deletions src/app/core/services/admin/test/admin.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import { HttpClient } from '@angular/common/http'
import { of, Subject, throwError } from 'rxjs'
import { AppConfigService } from 'src/app/config/app-config.service'
import { IUserFilter } from 'src/app/shared/models/user/user-filter.interface'
import { IUser } from 'src/app/shared/models/user/user.interface'
import { mockRoles, mockUser, mockUsers, mockUsersToFilter } from 'src/mocks/data-mocks/admin.mock'
import { mockOrganization1 } from 'src/mocks/data-mocks/organizations.mock'
Expand All @@ -28,12 +27,6 @@ import { adminFilterTestcases } from './admin-filter-testcases'

describe('AdminService', () => {
let service: AdminService
let throttleTime: number

const filterConfig: IUserFilter = {
searchText: 'test',
filterItem: [],
}

const userProfileSubject$ = new Subject<any>()
const userProfileService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { AqlCategoryService } from './aql-category.service'
import { of, throwError } from 'rxjs'
import { AppConfigService } from 'src/app/config/app-config.service'
import { mockAqlCategories, mockAqlCategory1 } from 'src/mocks/data-mocks/aql-categories.mock'
import { mockProjects } from '../../../../mocks/data-mocks/project.mock'

describe('AqlCategoryService', () => {
let service: AqlCategoryService
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/aql-category/aql-category.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class AqlCategoryService {
*/
update(update: Omit<IAqlCategoryApi, 'id'>, id: number): Observable<IAqlCategoryApi> {
return this.httpClient.put<IAqlCategoryApi>(`${this.baseUrl}/${id}`, update).pipe(
tap((updated) => {
tap(() => {
this.aqlCategoriesSubject$.next(this.aqlCategories)
}),
catchError(this.handleError)
Expand Down

0 comments on commit 3c1905f

Please sign in to comment.