import 'package:flutter_test/flutter_test.dart';
import 'package:tane/services/auto_backup_store.dart';

import '../support/test_support.dart';

void main() {
  test('lastBackupAt is null until the first backup is marked', () async {
    final store = AutoBackupStore(InMemorySecretStore());
    expect(await store.lastBackupAt(), isNull);
  });

  test('markBackupAt round-trips to the second', () async {
    final store = AutoBackupStore(InMemorySecretStore());
    final when = DateTime.utc(2026, 7, 10, 8, 30);

    await store.markBackupAt(when);

    expect(await store.lastBackupAt(), when);
  });
}
