From 3a980da5c30df3c0c8520bc61cc130ee27a9344b Mon Sep 17 00:00:00 2001 From: Asone Date: Thu, 18 Jul 2024 07:14:50 +0200 Subject: [PATCH] fix(test): fix templating tests --- nostrss-core/src/template/template.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nostrss-core/src/template/template.rs b/nostrss-core/src/template/template.rs index d6cbcbb..ae8f8d3 100644 --- a/nostrss-core/src/template/template.rs +++ b/nostrss-core/src/template/template.rs @@ -94,8 +94,8 @@ mod tests { use super::*; use dotenv::from_filename; - use feed_rs::model::{Content, Link, Text}; + use mediatype::MediaTypeBuf; #[test] fn test_default_template_fallback() { @@ -138,10 +138,10 @@ mod tests { #[test] fn test_custom_template() { from_filename(".env.test").ok(); - + let text_plain: MediaTypeBuf = "text/plain; charset=UTF-8".parse().unwrap(); let entry = Entry { title: Some(Text { - content_type: mime::TEXT_PLAIN, + content_type: text_plain, src: None, content: "Test content".to_string(), }), @@ -180,10 +180,11 @@ mod tests { #[test] fn test_entry_to_hashmap() { + let text_plain: MediaTypeBuf = "text/plain; charset=UTF-8".parse().unwrap(); from_filename(".env.test").ok(); let entry = Entry { title: Some(Text { - content_type: mime::TEXT_PLAIN, + content_type: text_plain, src: None, content: "Test content".to_string(), }),