Add UI option to block deleted rooms from being rejoined (#26)

Add UI option to block deleted rooms from being rejoined
This is almost a copy of https://github.com/Awesome-Technologies/synapse-admin/pull/166 PR,
authored by @jkanefendt
This commit is contained in:
Borislav Pantaleev
2024-09-14 11:03:51 +03:00
committed by GitHub
parent 0bf3440fc8
commit 7de9166648
11 changed files with 153 additions and 16 deletions

View File

@@ -2,6 +2,7 @@ import fetchMock from "jest-fetch-mock";
import authProvider from "./authProvider";
import storage from "../storage";
import { HttpError } from "ra-core";
fetchMock.enableMocks();
@@ -104,7 +105,7 @@ describe("authProvider", () => {
});
it("should reject if error.status is 403", async () => {
await expect(authProvider.checkError({ status: 403 })).rejects.toBeUndefined();
await expect(authProvider.checkError(new HttpError("test-error", 403, {errcode: "test-errcode", error: "test-error"}))).rejects.toBeDefined();
});
});