]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Finalizes testing of the delete comment
authorTrenton Holmes <holmes.trenton@gmail.com>
Wed, 24 Aug 2022 15:27:43 +0000 (08:27 -0700)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Wed, 24 Aug 2022 21:24:10 +0000 (14:24 -0700)
src/documents/tests/test_api.py

index 774b8dde3f63a8ed1cb516c0bb442c64e52aa7e5..4942751e46515e129f467bfa6187425956445dea 100644 (file)
@@ -1459,13 +1459,14 @@ class TestDocumentApi(DirectoriesMixin, APITestCase):
         )
 
         response = self.client.delete(
-            f"/api/documents/{doc.pk}/comments/",
-            data={"id": f"{comment.pk}"},
+            f"/api/documents/{doc.pk}/comments/?id={comment.pk}",
             format="json",
         )
 
         self.assertEqual(response.status_code, 200)
 
+        self.assertEqual(len(Comment.objects.all()), 0)
+
     def test_get_comments_no_doc(self):
         """
         GIVEN: