From bb36283bdbe2c0d19c16e1917a88512f7ca460c1 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Wed, 21 Sep 2022 02:44:40 +0000 Subject: fix tests Signed-off-by: Xe Iaso --- src/post/mod.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/post/mod.rs b/src/post/mod.rs index 0ad5cc0..8ed99bf 100644 --- a/src/post/mod.rs +++ b/src/post/mod.rs @@ -1,9 +1,8 @@ -use crate::app::Config; use chrono::prelude::*; use color_eyre::eyre::{eyre, Result, WrapErr}; use glob::glob; use serde::{Deserialize, Serialize}; -use std::{borrow::Borrow, cmp::Ordering, path::PathBuf, sync::Arc}; +use std::{borrow::Borrow, cmp::Ordering, path::PathBuf}; use tokio::fs; pub mod frontmatter; @@ -174,30 +173,25 @@ pub async fn load(dir: &str) -> Result> { #[cfg(test)] mod tests { use super::*; - use crate::app::Config; use color_eyre::eyre::Result; - use std::sync::Arc; #[tokio::test] async fn blog() { let _ = pretty_env_logger::try_init(); - let cfg = Arc::new(Config::default()); - load(cfg, "blog").await.expect("posts to load"); + load("blog").await.expect("posts to load"); } #[tokio::test] async fn gallery() -> Result<()> { let _ = pretty_env_logger::try_init(); - let cfg = Arc::new(Config::default()); - load(cfg, "gallery").await?; + load("gallery").await?; Ok(()) } #[tokio::test] async fn talks() -> Result<()> { let _ = pretty_env_logger::try_init(); - let cfg = Arc::new(Config::default()); - load(cfg, "talks").await?; + load("talks").await?; Ok(()) } } -- cgit v1.2.3