Skip to content

Commit

Permalink
fix(test): fix templating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Asone committed Jul 18, 2024
1 parent d7fc501 commit 3a980da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nostrss-core/src/template/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ mod tests {

use super::*;
use dotenv::from_filename;

use feed_rs::model::{Content, Link, Text};
use mediatype::MediaTypeBuf;

Check failure on line 98 in nostrss-core/src/template/template.rs

View workflow job for this annotation

GitHub Actions / Test (beta)

unresolved import `mediatype`

#[test]
fn test_default_template_fallback() {
Expand Down Expand Up @@ -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(),
}),
Expand Down Expand Up @@ -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(),
}),
Expand Down

0 comments on commit 3a980da

Please sign in to comment.