Add test for regtest network

This commit is contained in:
Franck Royer 2018-07-26 10:51:15 +10:00
parent a7aff1372e
commit ba2879cfac
1 changed files with 2 additions and 0 deletions

View File

@ -95,9 +95,11 @@ mod tests {
fn string_test() {
assert_eq!(Network::Bitcoin.to_string(), "bitcoin");
assert_eq!(Network::Testnet.to_string(), "testnet");
assert_eq!(Network::Regtest.to_string(), "regtest");
assert_eq!("bitcoin".parse::<Network>().unwrap(), Network::Bitcoin);
assert_eq!("testnet".parse::<Network>().unwrap(), Network::Testnet);
assert_eq!("regtest".parse::<Network>().unwrap(), Network::Regtest);
assert!("fakenet".parse::<Network>().is_err());
}
}