mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 23:44:22 +00:00
Remove redundant test in useProfileSettings
This commit is contained in:
@@ -496,22 +496,5 @@ describe('useProfileSettings', () => {
|
|||||||
expect(returnedUser).toEqual(mockUser);
|
expect(returnedUser).toEqual(mockUser);
|
||||||
expect(mockUpdateProfile).toHaveBeenCalledWith({});
|
expect(mockUpdateProfile).toHaveBeenCalledWith({});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('handles update with undefined values', async () => {
|
|
||||||
const mockUpdateProfile = vi.mocked(userApi.updateProfile);
|
|
||||||
mockUpdateProfile.mockResolvedValue(mockUser);
|
|
||||||
|
|
||||||
const { result } = renderHook(() => useProfileSettings());
|
|
||||||
|
|
||||||
const updateRequest: UpdateProfileRequest = {};
|
|
||||||
|
|
||||||
let returnedUser: User | null = null;
|
|
||||||
await act(async () => {
|
|
||||||
returnedUser = await result.current.updateProfile(updateRequest);
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(returnedUser).toEqual(mockUser);
|
|
||||||
expect(mockUpdateProfile).toHaveBeenCalledWith(updateRequest);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user