feat: improved coverage

This commit is contained in:
2025-01-16 10:34:47 +01:00
parent b86584a702
commit ebb6d5a5a5
10 changed files with 196 additions and 7 deletions
+10
View File
@@ -44,6 +44,16 @@ class TestWishlist(TestCase, CreateProductsMixin):
user=self.user, product=self.product
).exists()
def test_not_logged_user_create_wishlisted_product(self):
assert WishlistedProduct.objects.count() == 0
response = self.client.post(
reverse("web:add_to_wishlist"),
{
"product": self.product.pk,
},
)
assert response.status_code == 400
def test_logged_user_delete_wishlisted_product(self):
wishlisted = WishlistedProduct.objects.create(
user=self.user, product=self.product