mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user