diff --git a/src/routes/Settings.test.tsx b/src/routes/Settings.test.tsx index ce3d69a51..1060e9adc 100644 --- a/src/routes/Settings.test.tsx +++ b/src/routes/Settings.test.tsx @@ -106,6 +106,31 @@ describe('routes/Settings.tsx', () => { false, ); }); + + it('should toggle account hostname checkbox', async () => { + await act(async () => { + render( + + + + + , + ); + }); + + await screen.findByLabelText('Show account hostname'); + + fireEvent.click(screen.getByLabelText('Show account hostname')); + + expect(updateSetting).toHaveBeenCalledTimes(1); + expect(updateSetting).toHaveBeenCalledWith('showAccountHostname', true); + }); }); describe('Notifications section', () => {