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 {
use super::*;
use crate::blogs::Blog;
use crate::db_conn::DbConn;
use crate::inbox::{inbox, tests::fill_database, InboxResult};
use crate::safe_string::SafeString;
use crate::tests::{db, format_datetime};

View file

@ -232,7 +232,9 @@ impl IntoId for Follow {
#[cfg(test)]
mod tests {
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 diesel::Connection;
use serde_json::{json, to_value};

View file

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