upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-11-18 11:02:39 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-11-18 11:02:39 +0000
commit3cf8621541b81ec654d5af9bde8297be1916c5fc (patch)
treee25f21076f68365a0d38db479ee148f9acb9aaf4 /src
parent689500f5f8978d29e535d8c33932ca69dcd43553 (diff)
test: nostr git url with path
add additional test to cover this scenario
Diffstat (limited to 'src')
-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 {