Skip to content

Commit 0b32457

Browse files
chrisbobbegnprice
authored andcommitted
api test: Include read_by_sender in send-message tests
The one caller passes read_by_sender, so these tests are now more representative of how the binding actually gets exercised. Next, we'll have the binding condition something on whether or not read_by_sender is passed, and that'll call for tests that omit it, which we'll add.
1 parent 4d5b3e1 commit 0b32457

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/api/route/messages_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,13 @@ void main() {
339339
return FakeApiConnection.with_((connection) async {
340340
await checkSendMessage(connection,
341341
destination: StreamDestination(streamId, topic), content: content,
342+
readBySender: true,
342343
expectedBodyFields: {
343344
'type': 'stream',
344345
'to': streamId.toString(),
345346
'topic': topic,
346347
'content': content,
348+
'read_by_sender': 'true',
347349
});
348350
});
349351
});
@@ -352,10 +354,12 @@ void main() {
352354
return FakeApiConnection.with_((connection) async {
353355
await checkSendMessage(connection,
354356
destination: DmDestination(userIds: userIds), content: content,
357+
readBySender: true,
355358
expectedBodyFields: {
356359
'type': 'direct',
357360
'to': jsonEncode(userIds),
358361
'content': content,
362+
'read_by_sender': 'true',
359363
});
360364
});
361365
});
@@ -364,10 +368,12 @@ void main() {
364368
return FakeApiConnection.with_(zulipFeatureLevel: 173, (connection) async {
365369
await checkSendMessage(connection,
366370
destination: DmDestination(userIds: userIds), content: content,
371+
readBySender: true,
367372
expectedBodyFields: {
368373
'type': 'private',
369374
'to': jsonEncode(userIds),
370375
'content': content,
376+
'read_by_sender': 'true',
371377
});
372378
});
373379
});

0 commit comments

Comments
 (0)