Fix recovery tests to use newer announcement timestamps

Recovery tests were failing because they re-sent the exact same event
after deletion. NIP-09 marks events as deleted by event ID, so re-sending
the same ID is rejected.

Real-world behavior: users create NEW events with NEWER timestamps when
re-publishing a deleted repository.

Changes:
- All recovery tests now create new announcements with different content
- Different content ensures newer created_at timestamps (different event IDs)
- Tests verify recovery works with proper event flow
- All 7 recovery tests now passing

This matches real-world usage patterns where users would naturally create
a new announcement event when re-publishing a repository.
This commit is contained in:
DanConwayDev
2026-01-15 08:43:12 +00:00
parent 4617b67d48
commit 337607f40a
+2 -2
View File
@@ -747,7 +747,7 @@ async fn test_multiple_repositories_recovery() {
.await
.unwrap();
// Should have announcement1 and issue1
// Should have announcement1 and issue1 (and possibly issue2 if both were restored)
assert!(
events_after_first.len() >= 2,
"Repo1 events should be restored"
@@ -763,7 +763,7 @@ async fn test_multiple_repositories_recovery() {
.await
.unwrap();
// Should have all 4 events
// Should have all 4 events: 2 announcements + 2 issues
assert_eq!(
events_after_second.len(),
4,