Skip to content

Commit 1fbd39b

Browse files
authored
Tweak ban test to make it clearer (#158)
1 parent 9c8d848 commit 1fbd39b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/federation_room_join_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ func TestBannedUserCannotSendJoin(t *testing.T) {
214214

215215
// alice creates a room, and bans charlie from it.
216216
alice := deployment.Client(t, "hs1", "@alice:hs1")
217-
roomID := alice.CreateRoom(t, map[string]interface{}{})
217+
roomID := alice.CreateRoom(t, map[string]interface{}{
218+
"preset": "public_chat",
219+
})
218220

219221
alice.SendEventSynced(t, roomID, b.Event{
220222
Type: "m.room.member",
@@ -238,7 +240,7 @@ func TestBannedUserCannotSendJoin(t *testing.T) {
238240
// SendJoin should return a 403.
239241
_, err = fedClient.SendJoin(context.Background(), "hs1", joinEvent, makeJoinResp.RoomVersion)
240242
if err == nil {
241-
t.Errorf("SendJoin returned 200")
243+
t.Errorf("SendJoin returned 200, want 403")
242244
} else if httpError, ok := err.(gomatrix.HTTPError); ok {
243245
t.Logf("SendJoin => %d/%s", httpError.Code, string(httpError.Contents))
244246
if httpError.Code != 403 {

0 commit comments

Comments
 (0)