Test debug

This commit is contained in:
David Robertson 2023-08-18 13:23:46 +01:00
parent 8bb4662b2c
commit 29f6cd0a1c
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD

View File

@ -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