Skip to content

Commit 6765527

Browse files
committed
store [nfc]: Use accountId directly rather than store.account.id
1 parent d1b90ea commit 6765527

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/model/store_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void main() {
215215
await prepareStore();
216216
updateMachine.debugPauseLoop();
217217
updateMachine.poll();
218-
check(globalStore.perAccountSync(store.account.id)).identicalTo(store);
218+
check(globalStore.perAccountSync(store.accountId)).identicalTo(store);
219219

220220
// Let the server expire the event queue.
221221
connection.prepare(httpStatus: 400, json: {
@@ -228,7 +228,7 @@ void main() {
228228
await Future.delayed(Duration.zero);
229229

230230
// The global store has a new store.
231-
check(globalStore.perAccountSync(store.account.id)).not((it) => it.identicalTo(store));
231+
check(globalStore.perAccountSync(store.accountId)).not((it) => it.identicalTo(store));
232232
updateFromGlobalStore();
233233

234234
// The new UpdateMachine updates the new store.

test/widgets/store_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MyWidgetWithMixinState extends State<MyWidgetWithMixin> with PerAccountSto
3535
@override
3636
Widget build(BuildContext context) {
3737
final brightness = Theme.of(context).brightness;
38-
final accountId = PerAccountStoreWidget.of(context).account.id;
38+
final accountId = PerAccountStoreWidget.of(context).accountId;
3939
return Text('brightness: $brightness; accountId: $accountId');
4040
}
4141
}
@@ -87,7 +87,7 @@ void main() {
8787
child: Builder(
8888
builder: (context) {
8989
final store = PerAccountStoreWidget.of(context);
90-
return Text('found store, account: ${store.account.id}');
90+
return Text('found store, account: ${store.accountId}');
9191
})))));
9292
await tester.pump();
9393
await tester.pump();
@@ -109,7 +109,7 @@ void main() {
109109
child: Builder(
110110
builder: (context) {
111111
final store = PerAccountStoreWidget.of(context);
112-
return Text('found store, account: ${store.account.id}');
112+
return Text('found store, account: ${store.accountId}');
113113
})))));
114114

115115
// First, the global store has to load.
@@ -137,7 +137,7 @@ void main() {
137137
child: Builder(
138138
builder: (context) {
139139
final store = PerAccountStoreWidget.of(context);
140-
return Text('found store, account: ${store.account.id}');
140+
return Text('found store, account: ${store.accountId}');
141141
})))));
142142

143143
// (... even one that really is separate, with its own fresh state node ...)

0 commit comments

Comments
 (0)