Skip to content

Commit 6745f17

Browse files
committed
Test that we can create a room with a topic
1 parent 3325356 commit 6745f17

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/unit-tests/createRoom-test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ describe("createRoom", () => {
7070
});
7171
});
7272

73+
it("creates a public room with a topic", async () => {
74+
await createRoom(client, { createOpts: { preset: Preset.PublicChat }, topic: "My topic" });
75+
76+
expect(client.createRoom).toHaveBeenCalledWith({
77+
preset: "public_chat",
78+
visibility: "private",
79+
topic: "My topic",
80+
initial_state: [{ state_key: "", type: "m.room.guest_access", content: { guest_access: "can_join" } }],
81+
});
82+
});
83+
7384
it("creates a public room in a space", async () => {
7485
const roomId = await createRoom(client, { roomType: RoomType.Space });
7586
const parentSpace = client.getRoom(roomId!)!;

0 commit comments

Comments
 (0)