diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-09 17:34:23 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-09 17:34:23 +0100 |
commit | 52240b9a0c9efaf0d092bfb029b6ca7e74442217 (patch) | |
tree | 25a45dc7b01196a5b0091aaabd95862373ebc68e /pyblackbird_cc/payments/tests/test_views.py | |
parent | 677c935fdc3b083a9940a1b2f280cb1ccdbc03bd (diff) |
wip: clicking add to cart button takes you to card detail but thats it
Diffstat (limited to 'pyblackbird_cc/payments/tests/test_views.py')
-rw-r--r-- | pyblackbird_cc/payments/tests/test_views.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pyblackbird_cc/payments/tests/test_views.py b/pyblackbird_cc/payments/tests/test_views.py index 0b469b5..7d0f8b5 100644 --- a/pyblackbird_cc/payments/tests/test_views.py +++ b/pyblackbird_cc/payments/tests/test_views.py @@ -12,5 +12,8 @@ def test_cart_view(client, user): @pytest.mark.django_db -def test_add_resource_to_cart(resource, user): - url = reverse("payments:add_to_cart", args=[resource.pk]) +def test_add_resource_to_cart(client, resource, user): + url = reverse("payments:add_to_cart", kwargs={"resource_id": resource.id}) + client.force_login(user) + response = client.get(url) + assert response.status_code == 200 |