Skip to content

Commit

Permalink
Add test for products not showing after quickbuy
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickreiffenstein committed Feb 20, 2025
1 parent 21c56d9 commit d976882
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions stregsystem/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d976882

Please sign in to comment.