Added unit test for send_sanick(...).

This commit is contained in:
Aaron Weiss 2014-10-29 00:48:56 -04:00
parent 8924e4e578
commit aad1d52b59

View file

@ -179,6 +179,14 @@ mod test {
assert!(IrcBot::from_connection(c, |_, _, _, _| { Ok(()) }).is_ok());
}
#[test]
fn send_sanick() {
let c = Connection::new(MemWriter::new(), NullReader).unwrap();
let b = IrcBot::from_connection(c, |_, _, _, _| { Ok(()) }).unwrap();
b.send_sanick("test", "test2").unwrap();
assert_eq!(data(b.conn), format!("SANICK test :test2\r\n"));
}
#[test]
fn send_nick() {
let c = Connection::new(MemWriter::new(), NullReader).unwrap();