Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit e3086c8

Browse files
committed
test: Update type assertions in unit tests for RefreshTokenGuard, OrganizationController, and OrganizationService to improve type safety
1 parent b722a84 commit e3086c8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/auth/guards/refresh-token.guard.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ describe('RefreshTokenGuard', () => {
124124
});
125125

126126
it('should add user information to request after validation', async () => {
127-
const request = { body: { refresh_token: 'valid-token' } };
127+
const request: any = { body: { refresh_token: 'valid-token' } };
128128
const context = createMockExecutionContext({ refresh_token: 'valid-token' });
129129
const payload = { email: 'admin@example.com', sub: 1 };
130130
vi.spyOn(jwtService, 'verify').mockReturnValue(payload as any);

src/organization/__tests__/organization.controller.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe('OrganizationController', () => {
157157

158158
if (!controllerService || !controllerS3Service) {
159159
// Если зависимости не внедрены, создаем контроллер вручную
160-
controller = new OrganizationController(mockService, mockS3Service);
160+
controller = new OrganizationController(mockService as any, mockS3Service as any);
161161
}
162162
});
163163

src/organization/__tests__/organization.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ describe('OrganizationService', () => {
263263
// Проверяем, что сервис получил repository
264264
// Если repository не внедрен, создаем сервис вручную
265265
if (!(service as any).repository) {
266-
service = new OrganizationService(mockRepository, mockS3Service, mockDb);
266+
service = new OrganizationService(mockRepository as any, mockS3Service as any, mockDb as any);
267267
}
268268
});
269269

0 commit comments

Comments
 (0)