mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Fix existing tests
This commit is contained in:
parent
cf21e5b072
commit
cd62d3ea84
@ -16,6 +16,8 @@ func TestLiveAccountDataAggregation(t *testing.T) {
|
||||
ext := &AccountDataRequest{
|
||||
Core: Core{
|
||||
Enabled: &boolTrue,
|
||||
Lists: []string{"*"},
|
||||
Rooms: []string{"*"},
|
||||
},
|
||||
}
|
||||
var res Response
|
||||
|
@ -90,6 +90,8 @@ func TestExtension_ApplyDelta(t *testing.T) {
|
||||
AccountData: &AccountDataRequest{
|
||||
Core: Core{
|
||||
Enabled: &boolTrue,
|
||||
Lists: []string{"*"},
|
||||
Rooms: []string{"*"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -16,10 +16,14 @@ func TestLiveReceiptsAggregation(t *testing.T) {
|
||||
ext := &ReceiptsRequest{
|
||||
Core: Core{
|
||||
Enabled: &boolTrue,
|
||||
Lists: []string{"*"},
|
||||
Rooms: []string{"*"},
|
||||
},
|
||||
}
|
||||
var res Response
|
||||
var extCtx Context
|
||||
extCtx := Context{
|
||||
AllSubscribedRooms: []string{roomA, roomB},
|
||||
}
|
||||
receiptA1 := &caches.ReceiptUpdate{
|
||||
Receipt: internal.Receipt{
|
||||
RoomID: roomA,
|
||||
|
@ -16,10 +16,14 @@ func TestLiveTypingAggregation(t *testing.T) {
|
||||
ext := &TypingRequest{
|
||||
Core: Core{
|
||||
Enabled: &boolTrue,
|
||||
Lists: []string{"*"},
|
||||
Rooms: []string{"*"},
|
||||
},
|
||||
}
|
||||
var res Response
|
||||
var extCtx Context
|
||||
extCtx := Context{
|
||||
AllSubscribedRooms: []string{roomA, roomB, roomC},
|
||||
}
|
||||
typingA1 := &caches.TypingUpdate{
|
||||
RoomUpdate: &dummyRoomUpdate{
|
||||
roomID: roomA,
|
||||
@ -83,6 +87,6 @@ func TestLiveTypingAggregation(t *testing.T) {
|
||||
ext.AppendLive(ctx, &res, extCtx, eventC1)
|
||||
want[roomC] = eventC1.GlobalRoomMetadata().TypingEvent
|
||||
if !reflect.DeepEqual(res.Typing.Rooms, want) {
|
||||
t.Fatalf("got %+v\nwant %+v", res.Typing.Rooms, want)
|
||||
t.Fatalf("got %s\nwant %s", res.Typing.Rooms, want)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user