diff options
author | Kartikaya Gupta <kats@seldon.staktrace.com> | 2016-12-04 02:12:08 -0500 |
---|---|---|
committer | Kartikaya Gupta <kats@seldon.staktrace.com> | 2016-12-04 02:12:08 -0500 |
commit | 0f0567f6209637b84287334489127adc31d9f453 (patch) | |
tree | ddf70aed2abcac6bda225e84ab69d8b90378b2ad /src | |
parent | fb01124256b82553183d529db72c66fd542bcd22 (diff) |
Rename test and check for body as well
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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(), ""); } } |