Skip to content

Commit 72cb129

Browse files
committed
store test: Add a test for throwing on missing queueId
1 parent 143c247 commit 72cb129

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/model/store_test.dart

+10
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,16 @@ void main() {
212212
check(connection).isOpen.isFalse();
213213
}));
214214

215+
test('GlobalStore.perAccount throws if missing queueId', () async {
216+
final globalStore = UpdateMachineTestGlobalStore(accounts: [eg.selfAccount]);
217+
globalStore.prepareRegisterQueueResponse = (connection) {
218+
connection.prepare(json:
219+
deepToJson(eg.initialSnapshot()) as Map<String, dynamic>
220+
..['queue_id'] = null);
221+
};
222+
await check(globalStore.perAccount(eg.selfAccount.id)).throws();
223+
});
224+
215225
// TODO test insertAccount
216226

217227
group('GlobalStore.updateAccount', () {

0 commit comments

Comments
 (0)