diff --git a/src/server/p2p/network.rs b/src/server/p2p/network.rs index e3b8d56..4699517 100644 --- a/src/server/p2p/network.rs +++ b/src/server/p2p/network.rs @@ -113,7 +113,7 @@ impl Squad { } pub fn as_string(&self) -> String { - self.inner.to_case(Case::Lower) + self.inner.clone() } } @@ -1175,3 +1175,20 @@ where S: ShareChain self.network_peer_store.clone() } } + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn squad_as_string_no_spaces_no_underscores() { + let squad = Squad::from("default".to_string()); + assert_eq!(squad.as_string(), "default"); + } + + #[test] + fn squad_as_string_with_spaces_with_underscores() { + let squad = Squad::from("default 2".to_string()); + assert_eq!(squad.as_string(), "default_2"); + } +}