]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/aggregates/site_aggregates.rs
First pass at adding comment trees. (#2362)
[lemmy.git] / crates / db_schema / src / aggregates / site_aggregates.rs
index bf372815a6f565264107542030d04bd27dc64f30..86a46e83f0e63263470aa25fe6b0c9a143c0725b 100644 (file)
@@ -72,17 +72,17 @@ mod tests {
     };
 
     // Insert two of those comments
-    let inserted_comment = Comment::create(&conn, &comment_form).unwrap();
+    let inserted_comment = Comment::create(&conn, &comment_form, None).unwrap();
 
     let child_comment_form = CommentForm {
       content: "A test comment".into(),
       creator_id: inserted_person.id,
       post_id: inserted_post.id,
-      parent_id: Some(inserted_comment.id),
       ..CommentForm::default()
     };
 
-    let _inserted_child_comment = Comment::create(&conn, &child_comment_form).unwrap();
+    let _inserted_child_comment =
+      Comment::create(&conn, &child_comment_form, Some(&inserted_comment.path)).unwrap();
 
     let site_aggregates_before_delete = SiteAggregates::read(&conn).unwrap();