Skip to content

Commit 8bcaa53

Browse files
committed
msglist test: Fix invalid message move
The streamId of the moved messages does not change as intended, and the topic remains the same; this is not a valid message move. We will later introduce a data structure that captures inconsistencies of this kind. Signed-off-by: Zixuan James Li <[email protected]>
1 parent 3201ee1 commit 8bcaa53

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/model/message_list_test.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -825,11 +825,14 @@ void main() {
825825
});
826826

827827
test('unrelated channel -> new channel: unaffected', () async {
828+
final thirdStream = eg.stream();
828829
await prepareNarrow(narrow, initialMessages);
830+
await store.addStream(thirdStream);
831+
await store.addSubscription(eg.subscription(thirdStream));
829832

830833
await store.handleEvent(eg.updateMessageEventMoveFrom(
831834
origMessages: otherChannelMovedMessages,
832-
newStreamId: otherStream.streamId,
835+
newStreamId: thirdStream.streamId,
833836
));
834837
checkHasMessages(initialMessages);
835838
checkNotNotified();

0 commit comments

Comments
 (0)