Skip to content

Commit c961903

Browse files
notif test [nfc]: Cleanup TestPlatformDispatcher.defaultRouteNameTestValue
1 parent 3ff7096 commit c961903

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
@@ -1070,6 +1070,7 @@ void main() {
10701070

10711071
testWidgets('at app launch', (tester) async {
10721072
addTearDown(testBinding.reset);
1073+
addTearDown(tester.binding.platformDispatcher.clearDefaultRouteNameTestValue);
10731074
// Set up a value for `PlatformDispatcher.defaultRouteName` to return,
10741075
// for determining the intial route.
10751076
final account = eg.selfAccount;
@@ -1079,11 +1080,11 @@ void main() {
10791080
realmUrl: data.realmUrl,
10801081
userId: data.userId,
10811082
narrow: switch (data.recipient) {
1082-
FcmMessageChannelRecipient(:var streamId, :var topic) =>
1083-
TopicNarrow(streamId, topic),
1084-
FcmMessageDmRecipient(:var allRecipientIds) =>
1085-
DmNarrow(allRecipientIds: allRecipientIds, selfUserId: data.userId),
1086-
}).buildUrl();
1083+
FcmMessageChannelRecipient(:var streamId, :var topic) =>
1084+
TopicNarrow(streamId, topic),
1085+
FcmMessageDmRecipient(:var allRecipientIds) =>
1086+
DmNarrow(allRecipientIds: allRecipientIds, selfUserId: data.userId),
1087+
}).buildUrl();
10871088
tester.binding.platformDispatcher.defaultRouteNameTestValue = intentDataUrl.toString();
10881089

10891090
// Now start the app.

0 commit comments

Comments
 (0)