Add source_site_id to ActiveSite model and implement unique constraint. Update serializers and views for site registration and claiming. Enhance tests for site registration and claiming functionality.

This commit is contained in:
Alberto-Audrix committed 2026-09-15 09:45:23 +07:00
1 parent 521f36d22d
commit 61f954a3bd
12 files changed
+684 -172

No files matched your search

+2 -6
View File
@@ -156,7 +156,7 @@ describe('SettingsPage city site registry', () => {
render(<SettingsPage />);
await screen.findByText('Sukawarna');
fireEvent.change(screen.getByPlaceholderText('Contoh: Sukawarna'), {
fireEvent.change(screen.getByPlaceholderText('sukawarna'), {
target: { value: 'Cikupa' },
});
fireEvent.click(screen.getByRole('button', { name: 'Tambah ke daftar' }));
@@ -164,12 +164,8 @@ describe('SettingsPage city site registry', () => {
await waitFor(() => expect(createMock).toHaveBeenCalledTimes(1));
expect(createMock).toHaveBeenCalledWith({
code: 'cikupa',
name: 'Cikupa',
is_active: true,
});
});
it('lets GM request a BUH', async () => {
}); it('lets GM request a BUH', async () => {
requestMock.mockResolvedValue({
...authState.user,
managed_by_pending: 2,