more refactor
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled

This commit is contained in:
2025-12-21 21:14:22 -08:00
parent bc2c24bcff
commit de5425ef91
8 changed files with 40 additions and 42 deletions

View File

@@ -484,7 +484,7 @@ describe('Admin DB Service', () => {
describe('updateUserRole', () => {
it('should update the user role and return the updated user', async () => {
const mockProfile: Profile = createMockProfile({ user_id: '1', role: 'admin' });
const mockProfile: Profile = createMockProfile({ role: 'admin' });
mockPoolInstance.query.mockResolvedValue({ rows: [mockProfile], rowCount: 1 });
const result = await adminRepo.updateUserRole('1', 'admin', mockLogger);
expect(mockPoolInstance.query).toHaveBeenCalledWith('UPDATE public.profiles SET role = $1 WHERE user_id = $2 RETURNING *', ['admin', '1']);