@@ -454,6 +454,7 @@ void main() {
454
454
bool ? sendNotificationToOldThread,
455
455
bool ? sendNotificationToNewThread,
456
456
String ? content,
457
+ String ? prevContentSha256,
457
458
int ? streamId,
458
459
required Map <String , String > expected,
459
460
}) async {
@@ -464,6 +465,7 @@ void main() {
464
465
sendNotificationToOldThread: sendNotificationToOldThread,
465
466
sendNotificationToNewThread: sendNotificationToNewThread,
466
467
content: content,
468
+ prevContentSha256: prevContentSha256,
467
469
streamId: streamId,
468
470
);
469
471
check (connection.lastRequest).isA< http.Request > ()
@@ -473,6 +475,20 @@ void main() {
473
475
return result;
474
476
}
475
477
478
+ test ('pure content change' , () {
479
+ return FakeApiConnection .with_ ((connection) async {
480
+ connection.prepare (json: UpdateMessageResult ().toJson ());
481
+ await checkUpdateMessage (connection,
482
+ messageId: eg.streamMessage ().id,
483
+ content: 'asdf' ,
484
+ prevContentSha256: '34a780ad578b997db55b260beb60b501f3e04d30ba1a51fcf43cd8dd1241780d' ,
485
+ expected: {
486
+ 'content' : 'asdf' ,
487
+ 'prev_content_sha256' : '34a780ad578b997db55b260beb60b501f3e04d30ba1a51fcf43cd8dd1241780d' ,
488
+ });
489
+ });
490
+ });
491
+
476
492
test ('topic/content change' , () {
477
493
// A separate test exercises `streamId`;
478
494
// the API doesn't allow changing channel and content at the same time.
0 commit comments