Skip to content

Commit 8995493

Browse files
notif test [nfc]: Cleanup TestPlatformDispatcher.defaultRouteNameTestValue
1 parent ae7939a commit 8995493

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/notifications/display_test.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,7 @@ void main() {
11031103

11041104
testWidgets('at app launch', (tester) async {
11051105
addTearDown(testBinding.reset);
1106+
addTearDown(tester.binding.platformDispatcher.clearDefaultRouteNameTestValue);
11061107
// Set up a value for `PlatformDispatcher.defaultRouteName` to return,
11071108
// for determining the intial route.
11081109
final account = eg.selfAccount;
@@ -1112,11 +1113,11 @@ void main() {
11121113
realmUrl: data.realmUrl,
11131114
userId: data.userId,
11141115
narrow: switch (data.recipient) {
1115-
FcmMessageChannelRecipient(:var streamId, :var topic) =>
1116-
TopicNarrow(streamId, topic),
1117-
FcmMessageDmRecipient(:var allRecipientIds) =>
1118-
DmNarrow(allRecipientIds: allRecipientIds, selfUserId: data.userId),
1119-
}).buildUrl();
1116+
FcmMessageChannelRecipient(:var streamId, :var topic) =>
1117+
TopicNarrow(streamId, topic),
1118+
FcmMessageDmRecipient(:var allRecipientIds) =>
1119+
DmNarrow(allRecipientIds: allRecipientIds, selfUserId: data.userId),
1120+
}).buildUrl();
11201121
tester.binding.platformDispatcher.defaultRouteNameTestValue = intentDataUrl.toString();
11211122

11221123
// Now start the app.

0 commit comments

Comments
 (0)