From 3bf943fedc1e0e67a010dd9f1a5fb8791c390a75 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 29 Apr 2024 00:53:54 +0200
Subject: [PATCH] Extend Condition tests.

---
 tests/conditions.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/conditions.py b/tests/conditions.py
index 6538e87..db6c745 100644
--- a/tests/conditions.py
+++ b/tests/conditions.py
@@ -62,6 +62,11 @@ class TestsWithServer(TestCaseWithServer):
         form_data = {'title': 'foo', 'description': 'foo'}
         self.check_post(form_data, '/condition', 302, '/condition?id=1')
         self.assertEqual(1, len(Condition.all(self.db_conn)))
+        form_data['delete'] = ''
+        self.check_post(form_data, '/condition?id=', 404)
+        self.check_post(form_data, '/condition?id=2', 404)
+        self.check_post(form_data, '/condition?id=1', 302, '/conditions')
+        self.assertEqual(0, len(Condition.all(self.db_conn)))
 
     def test_do_GET(self) -> None:
         """Test /condition and /conditions response codes."""
-- 
2.30.2