feat: improved coverage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user