Skip to content

Commit 5634c57

Browse files
PIG208gnprice
authored andcommitted
store test: Add a test for throwing on missing queueId
1 parent 942aa87 commit 5634c57

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/model/store_test.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,16 @@ void main() {
296296
check(connection).isOpen.isFalse();
297297
}));
298298

299+
test('GlobalStore.perAccount throws if missing queueId', () async {
300+
final globalStore = UpdateMachineTestGlobalStore(accounts: [eg.selfAccount]);
301+
globalStore.prepareRegisterQueueResponse = (connection) {
302+
connection.prepare(json:
303+
deepToJson(eg.initialSnapshot()) as Map<String, dynamic>
304+
..['queue_id'] = null);
305+
};
306+
await check(globalStore.perAccount(eg.selfAccount.id)).throws();
307+
});
308+
299309
// TODO test insertAccount
300310

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

0 commit comments

Comments
 (0)