Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix: Adding test for basket paypal redirect qs param
Browse files Browse the repository at this point in the history
  • Loading branch information
grmartin committed Jul 5, 2024
1 parent ca87ce3 commit d9c2531
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ecommerce/extensions/basket/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ def test_basket_with_utm_params(self):
expected_url = self.get_full_url(reverse('basket:summary')) + '?utm_source=test'
self.assertEqual(response.url, expected_url)

def test_basket_with_paypal_param(self):
""" Verify the basket includes paypal param after redirect. """
products = ProductFactory.create_batch(3, stockrecords__partner=self.partner)
response = self._get_response(
[product.stockrecords.first().partner_sku for product in products],
paypal_redirect='1',
)
expected_url = self.get_full_url(reverse('basket:summary')) + '?paypal_redirect=1'
self.assertEqual(response.url, expected_url)

@responses.activate
def test_redirect_to_basket_summary(self):
"""
Expand Down

0 comments on commit d9c2531

Please sign in to comment.