Skip to content

Commit

Permalink
Use DbConn in model tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KitaitiMakoto committed Mar 19, 2023
1 parent 85ab539 commit 33bd290
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions plume-models/src/comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
4 changes: 3 additions & 1 deletion plume-models/src/follows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions plume-models/src/posts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 33bd290

Please sign in to comment.