From d976882dff1868b06eb224bbb70878964421f131 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 20 Feb 2025 17:46:40 +0100 Subject: [PATCH] Add test for products not showing after quickbuy --- stregsystem/tests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stregsystem/tests.py b/stregsystem/tests.py index bf953762..a4ac5bee 100644 --- a/stregsystem/tests.py +++ b/stregsystem/tests.py @@ -211,6 +211,12 @@ def test_make_sale_quickbuy_wrong_product(self): self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, "stregsystem/error_productdoesntexist.html") + def test_products_show_when_quickbuying(self): + response = self.client.post(reverse('quickbuy', args="1"), {"quickbuy": "jokke 1"}) + + self.assertEqual(response.status_code, 200) + self.assertNotContains(response, "Ingen produkter.") + @patch('stregsystem.models.Member.can_fulfill') def test_make_sale_menusale_fail(self, can_fulfill): can_fulfill.return_value = False