Make tests follow API changes

This commit is contained in:
Kitaiti Makoto
2021-01-31 21:58:44 +09:00
parent 25e52788c5
commit 78be49d57d
8 changed files with 305 additions and 338 deletions
+1 -12
View File
@@ -294,12 +294,10 @@ pub fn ap_url(url: &str) -> String {
#[cfg(test)]
#[macro_use]
mod tests {
use crate::{db_conn, migrations::IMPORTED_MIGRATIONS, search, Connection as Conn, CONFIG};
use crate::{db_conn, migrations::IMPORTED_MIGRATIONS, Connection as Conn, CONFIG};
use diesel::r2d2::ConnectionManager;
use plume_common::utils::random_hex;
use scheduled_thread_pool::ScheduledThreadPool;
use std::env::temp_dir;
use std::sync::Arc;
#[macro_export]
macro_rules! part_eq {
@@ -329,15 +327,6 @@ mod tests {
pool
};
}
pub fn rockets() -> super::PlumeRocket {
super::PlumeRocket {
conn: db_conn::DbConn((*DB_POOL).get().unwrap()),
searcher: Arc::new(search::tests::get_searcher(&CONFIG.search_tokenizers)),
worker: Arc::new(ScheduledThreadPool::new(2)),
user: None,
}
}
}
pub mod admin;