diff options
| author | Xe Iaso <me@christine.website> | 2022-09-21 02:44:40 +0000 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2022-09-21 02:44:40 +0000 |
| commit | bb36283bdbe2c0d19c16e1917a88512f7ca460c1 (patch) | |
| tree | 0a084b4d3c0631d665d0e5517c7db22029b9fcdf /src | |
| parent | 108e70f064119230d04c69eefa391105fa089b17 (diff) | |
| download | xesite-bb36283bdbe2c0d19c16e1917a88512f7ca460c1.tar.xz xesite-bb36283bdbe2c0d19c16e1917a88512f7ca460c1.zip | |
fix tests
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'src')
| -rw-r--r-- | src/post/mod.rs | 14 |
1 files changed, 4 insertions, 10 deletions
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<Vec<Post>> { #[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(()) } } |
