Skip to content

Commit 54f0538

Browse files
gnpricechrisbobbe
authored andcommitted
home test [nfc]: Move specific prep into specific tests
And it turns out the stream and subscription weren't being used at all.
1 parent d90c5a0 commit 54f0538

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/widgets/home_test.dart

+2-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ void main () {
3131
addTearDown(testBinding.reset);
3232
await testBinding.globalStore.add(eg.selfAccount, eg.initialSnapshot());
3333
store = await testBinding.globalStore.perAccount(eg.selfAccount.id);
34-
35-
await store.addUsers([eg.selfUser, eg.otherUser]);
36-
final stream = eg.stream();
37-
await store.addStream(stream);
38-
await store.addSubscription(eg.subscription(stream));
34+
await store.addUser(eg.selfUser);
3935

4036
await tester.pumpWidget(TestZulipApp(
4137
accountId: eg.selfAccount.id,
@@ -46,6 +42,7 @@ void main () {
4642
group('bottom nav navigation', () {
4743
testWidgets('preserve states when switching between views', (tester) async {
4844
await prepare(tester);
45+
await store.addUser(eg.otherUser);
4946
await store.handleEvent(MessageEvent(
5047
id: 0, message: eg.dmMessage(from: eg.otherUser, to: [eg.selfUser])));
5148
await tester.pump();

0 commit comments

Comments
 (0)