Fix test: correctly set alias

This commit is contained in:
David Robertson 2023-09-08 18:16:52 +01:00
parent 773a28cf14
commit 6df13a160f
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD

View File

@ -81,13 +81,14 @@ func TestRedactingRoomNameIsReflectedInNextSync(t *testing.T) {
alice := registerNamedUser(t, "alice")
t.Log("Alice creates a room and sets a room name.")
room := alice.CreateRoom(t, map[string]any{})
const naughty = "naughty room for naughty people"
const aliasLocalPart = "nice-alias"
nameID := alice.SetState(t, room, "m.room.name", "", map[string]any{
"name": naughty,
aliasLocalPart := t.Name()
room := alice.CreateRoom(t, map[string]any{
"room_alias_name": aliasLocalPart,
})
const naughty = "naughty room for naughty people"
nameID := alice.SetState(t, room, "m.room.name", "", map[string]any{
"name": naughty,
})
t.Log("Alice sliding syncs, subscribing to that room explicitly.")
res := alice.SlidingSync(t, sync3.Request{