upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/git/nostr_url.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/git/nostr_url.rs b/src/lib/git/nostr_url.rs
index 23c98e7..c26c56a 100644
--- a/src/lib/git/nostr_url.rs
+++ b/src/lib/git/nostr_url.rs
@@ -1033,6 +1033,31 @@ mod tests {
1033 } 1033 }
1034 1034
1035 #[test] 1035 #[test]
1036 fn relay_hint_has_path() -> Result<()> {
1037 assert_eq!(
1038 format!("{}", NostrUrlDecoded {
1039 original_string: String::new(),
1040 coordinate: Nip19Coordinate {
1041 coordinate: Coordinate {
1042 identifier: "ngit".to_string(),
1043 public_key: PublicKey::parse(
1044 "npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr",
1045 )
1046 .unwrap(),
1047 kind: nostr_sdk::Kind::GitRepoAnnouncement,
1048 },
1049 relays: vec![RelayUrl::parse("wss://nos.lol/outbox").unwrap()],
1050 },
1051 protocol: None,
1052 ssh_key_file: None,
1053 nip05: None,
1054 }),
1055 "nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/nos.lol%2Foutbox/ngit",
1056 );
1057 Ok(())
1058 }
1059
1060 #[test]
1036 fn with_protocol() -> Result<()> { 1061 fn with_protocol() -> Result<()> {
1037 assert_eq!( 1062 assert_eq!(
1038 format!("{}", NostrUrlDecoded { 1063 format!("{}", NostrUrlDecoded {