upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/purgatory_sync.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-08 11:20:35 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-08 11:23:28 +0000
commit5d02ad6b893f9059044914c115d77cf9d8e589c3 (patch)
treeb727f9c44d2f2d4e203dc2344e4c9bd5144a77dd /tests/purgatory_sync.rs
parent075307804bf66bba10f5bc55cb40e2e6a98a65ee (diff)
refactor: replace hardcoded Kind constants with rust-nostr variants
- Replace KIND_REPOSITORY_ANNOUNCEMENT with Kind::GitRepoAnnouncement - Replace KIND_REPOSITORY_STATE with Kind::RepoState - Replace KIND_PR with Kind::GitPullRequest - Replace KIND_PR_UPDATE with Kind::GitPullRequestUpdate - Replace KIND_USER_GRASP_LIST with Kind::GitUserGraspList - Replace KIND_PATCH with Kind::GitPatch - Replace KIND_ISSUE with Kind::GitIssue - Replace KIND_COMMENT with Kind::Comment - Replace all Kind::Custom(30617|30618|1617|1618|1619|1621|1111|10317) patterns - Remove all hardcoded KIND_* constants from events.rs - Update all match statements to use Kind enum directly - Update all filter builders to use Kind variants - Update all test helpers and assertions Benefits: - Type safety: compiler prevents wrong kind numbers - Readability: Kind::GitRepoAnnouncement is self-documenting - Maintainability: single source of truth (rust-nostr) - IDE support: full autocompletion and refactoring - Standards: aligns with rust-nostr best practices Files modified: 21 Constants removed: 9 Patterns replaced: 100+ Tests passing: 222/222
Diffstat (limited to 'tests/purgatory_sync.rs')
-rw-r--r--tests/purgatory_sync.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/purgatory_sync.rs b/tests/purgatory_sync.rs
index 3f52e4c..72f3d81 100644
--- a/tests/purgatory_sync.rs
+++ b/tests/purgatory_sync.rs
@@ -795,7 +795,7 @@ async fn test_pr_event_clone_tag_sync_with_partial_oid_aggregation_from_multiple
795 // Clone URLs: source_grasp + syncing (NOT git_server - PR commit only via PR's clone tag) 795 // Clone URLs: source_grasp + syncing (NOT git_server - PR commit only via PR's clone tag)
796 // Relay URLs: source_grasp + mock_relay + syncing 796 // Relay URLs: source_grasp + mock_relay + syncing
797 let announcement = nostr_sdk::EventBuilder::new( 797 let announcement = nostr_sdk::EventBuilder::new(
798 nostr_sdk::Kind::Custom(30617), 798 Kind::GitRepoAnnouncement,
799 "Repository for PR clone tag + partial OID test", 799 "Repository for PR clone tag + partial OID test",
800 ) 800 )
801 .tags(vec![ 801 .tags(vec![