feat: 重构会话管理与提醒通知系统
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:social_app/data/cache/cache_scope.dart';
|
||||
import 'package:social_app/data/cache/cache_store.dart';
|
||||
|
||||
void main() {
|
||||
@@ -24,5 +25,20 @@ void main() {
|
||||
final secondRead = await hybrid.read<String>('k');
|
||||
expect(secondRead, 'v');
|
||||
});
|
||||
|
||||
test('cache invalidator no-ops without configured scope', () async {
|
||||
CacheScope.resetProvider();
|
||||
final invalidator = CacheInvalidator(
|
||||
store: HybridCacheStore(
|
||||
memory: MemoryCacheStore(),
|
||||
persistent: PersistentCacheStore(),
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
() => invalidator.invalidate('calendar:day:2026-03-31'),
|
||||
returnsNormally,
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user