more refactor
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user