test: anchors removal test iterates the full default set

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dorian 2026-07-22 21:47:05 +01:00
parent 1a30f984d5
commit 72c1bdd57d

View File

@ -358,10 +358,10 @@ mod tests {
// Removing every default leaves an empty authoritative list that must // Removing every default leaves an empty authoritative list that must
// not be re-seeded on next load. // not be re-seeded on next load.
let dir = tempfile::tempdir().unwrap(); let dir = tempfile::tempdir().unwrap();
remove(dir.path(), ARCHY_ANCHOR_NPUB).await.unwrap(); let mut list = Vec::new();
let list = remove(dir.path(), DEFAULT_PUBLIC_ANCHOR_NPUB) for anchor in default_public_anchors() {
.await list = remove(dir.path(), &anchor.npub).await.unwrap();
.unwrap(); }
assert!(list.is_empty()); assert!(list.is_empty());
let got = load(dir.path()).await.unwrap(); let got = load(dir.path()).await.unwrap();
assert!(got.is_empty(), "defaults must stay removed once edited"); assert!(got.is_empty(), "defaults must stay removed once edited");