mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Test debug
This commit is contained in:
parent
8bb4662b2c
commit
29f6cd0a1c
@ -154,6 +154,7 @@ func TestFiltersInvite(t *testing.T) {
|
||||
rig := NewTestRig(t)
|
||||
defer rig.Finish()
|
||||
roomID := "!a:localhost"
|
||||
t.Log("Alice is invited to a room.")
|
||||
rig.SetupV2RoomsForUser(t, alice, NoFlush, map[string]RoomDescriptor{
|
||||
roomID: {
|
||||
MembershipOfSyncer: "invite",
|
||||
@ -161,7 +162,7 @@ func TestFiltersInvite(t *testing.T) {
|
||||
})
|
||||
aliceToken := rig.Token(alice)
|
||||
|
||||
// make sure the is_invite filter works
|
||||
t.Log("Alice sliding syncs, requesting two separate lists: invites and joined rooms.")
|
||||
res := rig.V3.mustDoV3Request(t, aliceToken, sync3.Request{
|
||||
Lists: map[string]sync3.RequestList{
|
||||
"inv": {
|
||||
@ -182,6 +183,7 @@ func TestFiltersInvite(t *testing.T) {
|
||||
},
|
||||
},
|
||||
})
|
||||
t.Log("Alice should see the room appear in the invites list, and nothing in the joined rooms list.")
|
||||
m.MatchResponse(t, res, m.MatchLists(
|
||||
map[string][]m.ListMatcher{
|
||||
"inv": {
|
||||
@ -196,7 +198,7 @@ func TestFiltersInvite(t *testing.T) {
|
||||
},
|
||||
))
|
||||
|
||||
// Accept the invite
|
||||
t.Log("Alice accepts the invite.")
|
||||
rig.JoinRoom(t, alice, roomID)
|
||||
|
||||
// now the room should move from one room to another
|
||||
|
Loading…
x
Reference in New Issue
Block a user