aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_message.rs
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2019-11-16 11:14:10 +0100
committerDirk Van Haerenborgh <vhdirk@gmail.com>2019-11-16 11:14:10 +0100
commite16769c9b16223c491766f9c9b2c828ee2253ed4 (patch)
treed1a6e68acc5bbb14d9f1e6bf65d7549916ff95b9 /tests/test_message.rs
parent084675fdfe1329cbd58a48f2306b7c61dec08834 (diff)
downloadmail-e16769c9b16223c491766f9c9b2c828ee2253ed4.tar.gz
less unwraps
Diffstat (limited to 'tests/test_message.rs')
-rw-r--r--tests/test_message.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_message.rs b/tests/test_message.rs
index 152f565..7a6391d 100644
--- a/tests/test_message.rs
+++ b/tests/test_message.rs
@@ -70,7 +70,7 @@ mod message {
#[test]
fn test_header() {
let msg = MessageFixture::new();
- assert_eq!(msg.message.header(&"from").unwrap(), Some("<src@example.com>"));
+ assert_eq!(msg.message.header(&"from").unwrap().unwrap().to_string(), "<src@example.com>");
}
#[test]
@@ -172,10 +172,10 @@ mod properties {
fn test_add_single() {
let msg = MessageFixture::new();
msg.message.add_property(&"foo", &"bar").unwrap();
- assert_eq!(msg.message.property(&"foo", true).unwrap(), "bar");
+ assert_eq!(msg.message.property(&"foo").unwrap(), "bar");
msg.message.add_property(&"bar", &"baz").unwrap();
- assert_eq!(msg.message.property(&"bar", true).unwrap(), "baz");
+ assert_eq!(msg.message.property(&"bar").unwrap(), "baz");
}
#[test]
@@ -184,7 +184,7 @@ mod properties {
msg.message.add_property(&"foo", &"bar").unwrap();
msg.message.add_property(&"foo", &"baz").unwrap();
- assert_eq!(msg.message.property(&"foo", true).unwrap(), "bar");
+ assert_eq!(msg.message.property(&"foo").unwrap(), "bar");
let props = msg.message.properties(&"foo", true);
let expect = vec![("foo", "bar"), ("foo", "baz")];
@@ -222,7 +222,7 @@ mod properties {
msg.message.add_property(&"foo", &"b").unwrap();
msg.message.remove_all_properties(Some(&"foo")).unwrap();
- assert!(msg.message.property(&"foo", true).is_err());
+ assert!(msg.message.property(&"foo").is_err());
}
#[test]
@@ -232,7 +232,7 @@ mod properties {
msg.message.add_property(&"foo", &"b").unwrap();
msg.message.remove_property(&"foo", &"a").unwrap();
- assert_eq!(msg.message.property(&"foo", true).unwrap(), "b");
+ assert_eq!(msg.message.property(&"foo").unwrap(), "b");
}
#[test]
@@ -241,7 +241,7 @@ mod properties {
msg.message.add_property(&"foo", &"a").unwrap();
msg.message.remove_all_properties(None).unwrap();
- assert!(msg.message.property(&"foo", true).is_err());
+ assert!(msg.message.property(&"foo").is_err());
}
#[test]