diff options
author | Philipp Korber <p.korber@1aim.com> | 2018-11-16 18:09:38 +0100 |
---|---|---|
committer | Philipp Korber <p.korber@1aim.com> | 2018-11-16 18:09:38 +0100 |
commit | 917c9a3c87a74da6d171e8adc90aba2550278995 (patch) | |
tree | 7f2fd966113263bf1f3e4944a952f0755b7b610b /smtp | |
parent | 606cbacdc9c10ffb2375974b889cc9bebe3fabc7 (diff) |
core(smtp/deps) applied remaining changes from deps to smtp crate
Diffstat (limited to 'smtp')
-rw-r--r-- | smtp/Cargo.toml | 6 | ||||
-rw-r--r-- | smtp/src/request.rs | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/smtp/Cargo.toml b/smtp/Cargo.toml index 536a92e..28b18fd 100644 --- a/smtp/Cargo.toml +++ b/smtp/Cargo.toml @@ -20,4 +20,8 @@ new-tokio-smtp = "0.8.1" [features] test-with-traceing = ["mail-internals/traceing"] -extended-api = []
\ No newline at end of file +extended-api = [] + + +[dev-dependencies] +mail-core = { path="../core", features=["test-utils"] }
\ No newline at end of file diff --git a/smtp/src/request.rs b/smtp/src/request.rs index 5f68437..6a17aac 100644 --- a/smtp/src/request.rs +++ b/smtp/src/request.rs @@ -172,17 +172,16 @@ mod test { use mail::{ Mail, Resource, - file_buffer::FileBuffer + test_utils::CTX }; use headers::{ headers::{_From, _To, Sender}, - header_components::MediaType + header_components::{MediaType }, }; + fn mock_resource() -> Resource { - let mt = MediaType::parse("text/plain; charset=utf-8").unwrap(); - let fb = FileBuffer::new(mt, "abcd↓efg".to_owned().into()); - Resource::sourceless_from_buffer(fb) + Resource::plain_text("abcd↓efg", CTX.unwrap()) } #[test] |