- let read_comment = Comment::read(&conn, inserted_comment.id).unwrap();
- let updated_comment = Comment::update(&conn, inserted_comment.id, &comment_form).unwrap();
- let like_removed = CommentLike::remove(&conn, inserted_person.id, inserted_comment.id).unwrap();
- let saved_removed = CommentSaved::unsave(&conn, &comment_saved_form).unwrap();
- let num_deleted = Comment::delete(&conn, inserted_comment.id).unwrap();
- Comment::delete(&conn, inserted_child_comment.id).unwrap();
- Post::delete(&conn, inserted_post.id).unwrap();
- Community::delete(&conn, inserted_community.id).unwrap();
- Person::delete(&conn, inserted_person.id).unwrap();
+ let comment_update_form = CommentUpdateForm::builder()
+ .content(Some("A test comment".into()))
+ .build();
+
+ let updated_comment = Comment::update(pool, inserted_comment.id, &comment_update_form)
+ .await
+ .unwrap();
+
+ let read_comment = Comment::read(pool, inserted_comment.id).await.unwrap();
+ let like_removed = CommentLike::remove(pool, inserted_person.id, inserted_comment.id)
+ .await
+ .unwrap();
+ let saved_removed = CommentSaved::unsave(pool, &comment_saved_form)
+ .await
+ .unwrap();
+ let num_deleted = Comment::delete(pool, inserted_comment.id).await.unwrap();
+ Comment::delete(pool, inserted_child_comment.id)
+ .await
+ .unwrap();
+ Post::delete(pool, inserted_post.id).await.unwrap();
+ Community::delete(pool, inserted_community.id)
+ .await
+ .unwrap();
+ Person::delete(pool, inserted_person.id).await.unwrap();
+ Instance::delete(pool, inserted_instance.id).await.unwrap();