X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapub%2Fsrc%2Fobjects%2Fpost.rs;h=4789bdc1ba2d8b4dd8551ad61d2aaaffe57eeb1f;hb=c9f140742925d6da20103124b49f2b58a35fc2b8;hp=93273466d3e6b518dfa3d03b1e5daa2075600bad;hpb=4e6409f325bca5b2727b19c24d77ffa2b59109b1;p=lemmy.git diff --git a/crates/apub/src/objects/post.rs b/crates/apub/src/objects/post.rs index 93273466..4789bdc1 100644 --- a/crates/apub/src/objects/post.rs +++ b/crates/apub/src/objects/post.rs @@ -283,6 +283,7 @@ mod tests { #[serial] async fn test_parse_lemmy_post() { let context = init_context(); + let conn = &mut context.pool().get().unwrap(); let (person, site) = parse_lemmy_person(&context).await; let community = parse_lemmy_community(&context).await; @@ -304,9 +305,9 @@ mod tests { assert!(post.stickied); assert_eq!(request_counter, 0); - Post::delete(&*context.pool().get().unwrap(), post.id).unwrap(); - Person::delete(&*context.pool().get().unwrap(), person.id).unwrap(); - Community::delete(&*context.pool().get().unwrap(), community.id).unwrap(); - Site::delete(&*context.pool().get().unwrap(), site.id).unwrap(); + Post::delete(conn, post.id).unwrap(); + Person::delete(conn, person.id).unwrap(); + Community::delete(conn, community.id).unwrap(); + Site::delete(conn, site.id).unwrap(); } }