Implement guest buy now checkout
All checks were successful
Build and Push Docker Image / build (push) Successful in 26s

This commit is contained in:
2026-06-15 23:16:10 +02:00
parent f029e11175
commit a84b9af926
14 changed files with 322 additions and 85 deletions

View File

@@ -381,6 +381,13 @@ class CatalogViewTests(TestCase):
)
self.assertNotContains(response, "data-guest-cart-detail-button", html=False)
def test_detail_page_guest_buy_now_link_does_not_require_login(self):
response = self.client.get("/catalog/plumbing/kitchen-sink/")
self.assertEqual(response.status_code, 200)
self.assertContains(response, f'href="/orders/buy/{self.sink.id}/"', html=False)
self.assertContains(response, "Купить")
def test_header_cart_link_redirects_guest_to_login(self):
response = self.client.get("/catalog/")