fix(subscriptions): un abonnement en échec (failed) ne bloque plus le réabonnement

This commit is contained in:
Colin Maudry
2026-07-01 16:56:34 +02:00
parent 872fc33dd7
commit 126834c7d4
2 changed files with 20 additions and 2 deletions
@@ -77,3 +77,17 @@ def test_banner_absent_when_flag_off(monkeypatch):
from src.pages import compte_abonnement
assert compte_abonnement._tous_abonnes_banner() is None
def test_show_active_view_true_for_live_statuses(monkeypatch):
from src.pages import compte_abonnement
for status in ("pending", "trial", "active", "cancelled", "expired"):
assert compte_abonnement._show_active_view({"status": status}) is True
def test_show_active_view_false_for_failed_or_none(monkeypatch):
from src.pages import compte_abonnement
assert compte_abonnement._show_active_view({"status": "failed"}) is False
assert compte_abonnement._show_active_view(None) is False