]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/aggregates/comment_aggregates.rs
First pass at adding comment trees. (#2362)
[lemmy.git] / crates / db_schema / src / aggregates / comment_aggregates.rs
index ec08bd4ec4148b9fadcaad228865bfd50a8eb01f..679efeac0f2cd73f23e62ff07e4ecdfd7dcf5aae 100644 (file)
@@ -74,17 +74,17 @@ mod tests {
       ..CommentForm::default()
     };
 
-    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 comment_like = CommentLikeForm {
       comment_id: inserted_comment.id,