Skip to content

Commit 9c504fa

Browse files
chrisbobbesm-sayedi
authored andcommitted
notif test [nfc]: Remove a param that's effectively never used
This `init` function has only one caller, `prepare` (it could probably be inlined?); simplify by removing this param and the code inside that was never being exercised.
1 parent c562176 commit 9c504fa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/notifications/open_test.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ void main() {
7474
TestZulipBinding.ensureInitialized();
7575
final zulipLocalizations = GlobalLocalizations.zulipLocalizations;
7676

77-
Future<void> init({bool addSelfAccount = true}) async {
78-
if (addSelfAccount) {
79-
await testBinding.globalStore.add(eg.selfAccount, eg.initialSnapshot());
80-
}
77+
Future<void> init() async {
8178
addTearDown(testBinding.reset);
8279
testBinding.firebaseMessagingInitialToken = '012abc';
8380
addTearDown(NotificationService.debugReset);
@@ -104,7 +101,7 @@ void main() {
104101

105102
Future<void> prepare(WidgetTester tester,
106103
{bool early = false, bool withAccount = true}) async {
107-
await init(addSelfAccount: false);
104+
await init();
108105
pushedRoutes = [];
109106
final testNavObserver = TestNavigatorObserver()
110107
..onPushed = (route, prevRoute) => pushedRoutes.add(route);

0 commit comments

Comments
 (0)