Skip to content

Commit

Permalink
Test that only own delayed events are returned
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Sep 17, 2024
1 parent fc93193 commit f73508f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/msc4140/delayed_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ func TestDelayedEvents(t *testing.T) {
},
})

t.Run("cannot get delayed events of another user", func(t *testing.T) {
res := getDelayedEvents(t, user2)
must.MatchResponse(t, res, match.HTTPResponse{
JSON: []match.JSON{
match.JSONKeyArrayOfSize("delayed_events", 0),
},
})
})

time.Sleep(1 * time.Second)
res = getDelayedEvents(t, user)
must.MatchResponse(t, res, match.HTTPResponse{
Expand Down

0 comments on commit f73508f

Please sign in to comment.