refactor(calendar): remove deprecated reminder components
This commit is contained in:
@@ -36,7 +36,6 @@ void main() {
|
||||
|
||||
verifyNever(() => calendarService.getEventsForRange(any(), any()));
|
||||
verifyNever(() => notificationService.rebuildUpcomingReminders(any()));
|
||||
verifyNever(() => reminderActionExecutor.replayPendingActions());
|
||||
});
|
||||
|
||||
test('fetches upcoming events after authenticated state', () async {
|
||||
@@ -46,9 +45,6 @@ void main() {
|
||||
when(
|
||||
() => notificationService.rebuildUpcomingReminders(any()),
|
||||
).thenAnswer((_) async {});
|
||||
when(
|
||||
() => reminderActionExecutor.replayPendingActions(),
|
||||
).thenAnswer((_) async {});
|
||||
|
||||
await bootstrapper.syncForAuthState(
|
||||
const AuthAuthenticated(
|
||||
@@ -58,37 +54,5 @@ void main() {
|
||||
|
||||
verify(() => calendarService.getEventsForRange(any(), any())).called(1);
|
||||
verify(() => notificationService.rebuildUpcomingReminders(any())).called(1);
|
||||
verify(() => reminderActionExecutor.replayPendingActions()).called(1);
|
||||
});
|
||||
|
||||
test('retries sync when previous bootstrap failed', () async {
|
||||
when(
|
||||
() => reminderActionExecutor.replayPendingActions(),
|
||||
).thenThrow(Exception('offline'));
|
||||
|
||||
await bootstrapper.syncForAuthState(
|
||||
const AuthAuthenticated(
|
||||
user: AuthUser(id: 'u1', phone: 'a@test.com'),
|
||||
),
|
||||
);
|
||||
|
||||
when(
|
||||
() => reminderActionExecutor.replayPendingActions(),
|
||||
).thenAnswer((_) async {});
|
||||
when(
|
||||
() => calendarService.getEventsForRange(any(), any()),
|
||||
).thenAnswer((_) async => []);
|
||||
when(
|
||||
() => notificationService.rebuildUpcomingReminders(any()),
|
||||
).thenAnswer((_) async {});
|
||||
|
||||
await bootstrapper.syncForAuthState(
|
||||
const AuthAuthenticated(
|
||||
user: AuthUser(id: 'u1', phone: 'a@test.com'),
|
||||
),
|
||||
);
|
||||
|
||||
verify(() => reminderActionExecutor.replayPendingActions()).called(2);
|
||||
verify(() => calendarService.getEventsForRange(any(), any())).called(1);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user