crate::message - add tests (two failing due to not being implemented)

This commit is contained in:
Nathan Fisher 2023-06-05 11:23:15 -04:00
parent 98c8d2ac6e
commit bad5a230cc

View file

@ -75,3 +75,32 @@ impl FromStr for Message {
todo!() todo!()
} }
} }
#[cfg(test)]
mod tests {
use super::*;
static REC: &'static str = ": joe@example.org, jane@pizza.hut, mark@gemi.dev";
#[test]
fn parse_recipients() {
let rec: Recipients = REC.parse().unwrap();
assert!(rec.boxes.len() == 3);
}
#[test]
fn print_recipients() {
let rec: Recipients = REC.parse().unwrap();
assert_eq!(rec.to_string(), REC);
}
#[test]
fn parse_message() {
todo!()
}
#[test]
fn print_message() {
todo!()
}
}