summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-01-06 18:08:06 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-01-06 18:08:06 +0100
commitdcab5f8cc8be330feb9aed90d4680746f029a551 (patch)
tree83f29e4dc6862b5c1686caf33fc5fc3550e35eca
parentcceb01a9eb7eb15903dc29fc8ef65dcec755d1d2 (diff)
Add test for Email::header_field_names()header-keys
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--tests/test_fields.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_fields.rs b/tests/test_fields.rs
index ab43241..d75d195 100644
--- a/tests/test_fields.rs
+++ b/tests/test_fields.rs
@@ -133,3 +133,15 @@ fn header_using_crlf() {
thirsdcc <secondcc@destination.com>"
);
}
+
+#[test]
+fn find_all_header_fields() {
+ let email = Email::from_vec(TEST_EMAIL_CRLF.to_string().into_bytes()).unwrap();
+
+ assert!(
+ email.header_field_names()
+ .iter()
+ .all(|name| email.header_field(name).is_some())
+ );
+}
+