Skip to content

Commit

Permalink
Add test to NIP-88
Browse files Browse the repository at this point in the history
  • Loading branch information
223880 committed Nov 4, 2024
1 parent 344d368 commit aaaddbe
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/lending/nip_88.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,21 @@ pub (crate) fn Eventkind_90(event: Event) -> Event {
Event::Oracle(oracle) => Event::Oracle(oracle),
_ => Event::Nip(Nip::new(PubKey::from(""))),
}
}

#[cfg(test)]
mod tests {
use super::*;
use nostr::Event;
use nostr::Relay;

pub (crate) fn test_nip88() {
let nip = Nip::new(PubKey::from_str("pubkey").unwrap());
let event = Event::from(nip);
let relay = Relay::new("wss://relay.damus.io");
let Eventkid_88 = nip.sign(&event);
let Eventkind_89 = nip.sign(&event);
let Eventkind_90 = nip.sign(&event);
relay.publish(event);
}
}

0 comments on commit aaaddbe

Please sign in to comment.