Use DbConn in model tests

This commit is contained in:
Kitaiti Makoto 2023-03-20 01:21:39 +09:00
parent 85ab5393fd
commit 33bd290679
3 changed files with 5 additions and 1 deletions

View File

@ -422,6 +422,7 @@ impl CommentTree {
mod tests { mod tests {
use super::*; use super::*;
use crate::blogs::Blog; use crate::blogs::Blog;
use crate::db_conn::DbConn;
use crate::inbox::{inbox, tests::fill_database, InboxResult}; use crate::inbox::{inbox, tests::fill_database, InboxResult};
use crate::safe_string::SafeString; use crate::safe_string::SafeString;
use crate::tests::{db, format_datetime}; use crate::tests::{db, format_datetime};

View File

@ -232,7 +232,9 @@ impl IntoId for Follow {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::{tests::db, users::tests as user_tests, users::tests::fill_database}; use crate::{
db_conn::DbConn, tests::db, users::tests as user_tests, users::tests::fill_database,
};
use assert_json_diff::assert_json_eq; use assert_json_diff::assert_json_eq;
use diesel::Connection; use diesel::Connection;
use serde_json::{json, to_value}; use serde_json::{json, to_value};

View File

@ -1027,6 +1027,7 @@ impl From<PostEvent> for Arc<Post> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::db_conn::DbConn;
use crate::inbox::{inbox, tests::fill_database, InboxResult}; use crate::inbox::{inbox, tests::fill_database, InboxResult};
use crate::mentions::{Mention, NewMention}; use crate::mentions::{Mention, NewMention};
use crate::safe_string::SafeString; use crate::safe_string::SafeString;