mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-24 06:59:36 -05:00
Test to ensure default alice peer id and multi addr is valid
This commit is contained in:
parent
9a82b572ec
commit
975d604405
@ -97,3 +97,28 @@ impl Default for Command {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::cli::command::{Command, DEFAULT_ALICE_MULTIADDR, DEFAULT_ALICE_PEER_ID};
|
||||
use libp2p::{core::Multiaddr, PeerId};
|
||||
|
||||
#[test]
|
||||
fn parse_default_alice_peer_id_success() {
|
||||
DEFAULT_ALICE_PEER_ID
|
||||
.parse::<PeerId>()
|
||||
.expect("default alice peer id str is a valid PeerId");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_default_alice_multiaddr_success() {
|
||||
DEFAULT_ALICE_MULTIADDR
|
||||
.parse::<Multiaddr>()
|
||||
.expect("default alice multiaddr str is a valid Multiaddr>");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_command_success() {
|
||||
Command::default();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user