File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ DELETE FROM ps_untyped;
162
162
DELETE FROM ps_updated_rows;
163
163
DELETE FROM ps_kv WHERE key != 'client_id';
164
164
DELETE FROM ps_sync_state;
165
+ DELETE FROM ps_stream_subscriptions;
165
166
" ,
166
167
) ?;
167
168
Original file line number Diff line number Diff line change @@ -648,4 +648,18 @@ void main() {
648
648
}
649
649
]));
650
650
});
651
+
652
+ syncTest ('clearing database clears subscriptions' , (_) {
653
+ control (
654
+ 'subscriptions' ,
655
+ json.encode ({
656
+ 'subscribe' : {
657
+ 'stream' : {'name' : 'a' },
658
+ }
659
+ }),
660
+ );
661
+ expect (db.select ('select * from ps_stream_subscriptions' ), isNotEmpty);
662
+ db.execute ('select powersync_clear(0);' );
663
+ expect (db.select ('select * from ps_stream_subscriptions' ), isEmpty);
664
+ });
651
665
}
You can’t perform that action at this time.
0 commit comments