From 0f0567f6209637b84287334489127adc31d9f453 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Sun, 4 Dec 2016 02:12:08 -0500 Subject: Rename test and check for body as well --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index dfba9e1..91ae039 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -948,12 +948,14 @@ mod tests { assert_eq!(mail.ctype.mimetype, "text/html"); assert_eq!(mail.get_body().unwrap(), "hello world"); } + #[test] - fn test_content_type() { + fn test_missing_body() { let parsed = parse_mail( "Content-Type: multipart/related; boundary=\"----=_\"\n" .as_bytes()) .unwrap(); assert_eq!(parsed.headers[0].get_key().unwrap(), "Content-Type"); + assert_eq!(parsed.get_body().unwrap(), ""); } } -- cgit v1.2.3