Skip to content

Commit

Permalink
Fix test to provide m.room.create state after join
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Aug 18, 2023
1 parent 29f6cd0 commit e68ec09
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests-integration/filters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package syncv3
import (
"encoding/json"
"testing"
"time"

"github.com/matrix-org/sliding-sync/sync2"
"github.com/matrix-org/sliding-sync/sync3"
Expand Down Expand Up @@ -199,7 +200,20 @@ func TestFiltersInvite(t *testing.T) {
))

t.Log("Alice accepts the invite.")
rig.JoinRoom(t, alice, roomID)
rig.V2.queueResponse(alice, sync2.SyncResponse{
Rooms: sync2.SyncRoomsResponse{
Join: map[string]sync2.SyncV2JoinResponse{
roomID: {
State: sync2.EventsResponse{
Events: createRoomState(t, "@creator:other", time.Now()),
},
Timeline: sync2.TimelineResponse{
Events: []json.RawMessage{testutils.NewJoinEvent(t, alice)},
},
},
},
},
})

// now the room should move from one room to another
res = rig.V3.mustDoV3RequestWithPos(t, aliceToken, res.Pos, sync3.Request{
Expand Down

0 comments on commit e68ec09

Please sign in to comment.