Skip to content

Commit 68f3269

Browse files
committed
msglist test [nfc]: Fix some test descriptions
In all of these tests, the message list's narrow is a ChannelNarrow, and all of the deleted messages are in that channel. The tests aren't about whether or not the deleted messages are in the message list's narrow; really they're about whether or not the deleted messages are present in the MessageListView model.
1 parent 3ae958e commit 68f3269

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/model/message_list_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ void main() {
13371337
final stream = eg.stream();
13381338
final messages = List.generate(30, (i) => eg.streamMessage(stream: stream));
13391339

1340-
test('in narrow', () async {
1340+
test('all deleted messages are in the msglist', () async {
13411341
await prepare(narrow: ChannelNarrow(stream.streamId));
13421342
await prepareMessages(foundOldest: true, messages: messages);
13431343

@@ -1347,7 +1347,7 @@ void main() {
13471347
check(model).messages.length.equals(20);
13481348
});
13491349

1350-
test('not all in narrow', () async {
1350+
test('some deleted messages are in the msglist, some not', () async {
13511351
await prepare(narrow: ChannelNarrow(stream.streamId));
13521352
await prepareMessages(foundOldest: true, messages: messages.sublist(5));
13531353

@@ -1357,7 +1357,7 @@ void main() {
13571357
check(model).messages.length.equals(20);
13581358
});
13591359

1360-
test('not in narrow', () async {
1360+
test('none of the deleted messages are in the msglist', () async {
13611361
await prepare(narrow: ChannelNarrow(stream.streamId));
13621362
await prepareMessages(foundOldest: true, messages: messages.sublist(5));
13631363

@@ -1367,7 +1367,7 @@ void main() {
13671367
check(model).messages.length.equals(25);
13681368
});
13691369

1370-
test('complete message deletion', () async {
1370+
test('deleted messages are exactly those in the msglist', () async {
13711371
await prepare(narrow: ChannelNarrow(stream.streamId));
13721372
await prepareMessages(foundOldest: true, messages: messages.sublist(0, 25));
13731373

@@ -1377,7 +1377,7 @@ void main() {
13771377
check(model).messages.length.equals(0);
13781378
});
13791379

1380-
test('non-consecutive message deletion', () async {
1380+
test('deleted messages are present non-consecutively in the msglist', () async {
13811381
await prepare(narrow: ChannelNarrow(stream.streamId));
13821382
await prepareMessages(foundOldest: true, messages: messages);
13831383
final messagesToDelete = messages.sublist(2, 5) + messages.sublist(10, 15);

0 commit comments

Comments
 (0)