You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Move from browser-request
to fetch
(#9345)
This commit is contained in:
committed by
GitHub
parent
ae883bb94b
commit
8b54be6f48
@ -130,6 +130,20 @@ describe("createRoom", () => {
|
||||
expect(callPower).toBe(100);
|
||||
expect(callMemberPower).toBe(100);
|
||||
});
|
||||
|
||||
it("should upload avatar if one is passed", async () => {
|
||||
client.uploadContent.mockResolvedValue({ content_uri: "mxc://foobar" });
|
||||
const avatar = new File([], "avatar.png");
|
||||
await createRoom({ avatar });
|
||||
expect(client.createRoom).toHaveBeenCalledWith(expect.objectContaining({
|
||||
initial_state: expect.arrayContaining([{
|
||||
content: {
|
||||
url: "mxc://foobar",
|
||||
},
|
||||
type: "m.room.avatar",
|
||||
}]),
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe("canEncryptToAllUsers", () => {
|
||||
|
Reference in New Issue
Block a user