Skip to content

Commit 33c8a65

Browse files
committed
Fix up sync until functions
1 parent 73455de commit 33c8a65

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

tests/csapi/apidoc_room_alias_test.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import (
44
"net/http"
55
"testing"
66

7-
"github.com/tidwall/gjson"
8-
97
"github.com/matrix-org/complement/internal/b"
108
"github.com/matrix-org/complement/internal/client"
119
"github.com/matrix-org/complement/internal/match"
@@ -138,12 +136,7 @@ func TestRoomDeleteAlias(t *testing.T) {
138136
})
139137

140138
bob.JoinRoom(t, roomID, nil)
141-
// todo: replace with `SyncUntilJoined`
142-
bob.SyncUntilTimelineHas(t, roomID, func(event gjson.Result) bool {
143-
return event.Get("type").Str == "m.room.member" &&
144-
event.Get("content.membership").Str == "join" &&
145-
event.Get("state_key").Str == bob.UserID
146-
})
139+
bob.MustSyncUntil(t, client.SyncReq{}, client.SyncJoinedTo(bob.UserID, roomID))
147140

148141
roomAlias := "#no_ops_delete:hs1"
149142

@@ -175,12 +168,7 @@ func TestRoomDeleteAlias(t *testing.T) {
175168
})
176169

177170
bob.JoinRoom(t, roomID, nil)
178-
// todo: replace with `SyncUntilJoined`
179-
bob.SyncUntilTimelineHas(t, roomID, func(event gjson.Result) bool {
180-
return event.Get("type").Str == "m.room.member" &&
181-
event.Get("content.membership").Str == "join" &&
182-
event.Get("state_key").Str == bob.UserID
183-
})
171+
bob.MustSyncUntil(t, client.SyncReq{}, client.SyncJoinedTo(bob.UserID, roomID))
184172

185173
roomAlias := "#no_ops_delete_canonical:hs1"
186174

0 commit comments

Comments
 (0)