Gérer l'affichage d'un abonnement expiré (statut Frisbii "expired")

_show_active_view affichait par erreur la vue "abonnement actif" (avec un
faux "Prochaine facturation") pour un abonnement expiré. Un abonnement
expiré bascule maintenant sur l'écran de re-souscription, avec une alerte
dédiée. Jamais remarqué jusqu'ici car les webhooks Frisbii ne remontaient
pas ce changement de statut.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Colin Maudry
2026-07-02 18:13:12 +02:00
parent 1159697c0e
commit 14ae1a7bfb
2 changed files with 11 additions and 4 deletions
@@ -82,12 +82,13 @@ def test_banner_absent_when_flag_off(monkeypatch):
def test_show_active_view_true_for_live_statuses(monkeypatch):
from src.pages.compte import abonnement as compte_abonnement
for status in ("pending", "trial", "active", "cancelled", "expired"):
for status in ("pending", "trial", "active", "cancelled"):
assert compte_abonnement._show_active_view({"status": status}) is True
def test_show_active_view_false_for_failed_or_none(monkeypatch):
def test_show_active_view_false_for_failed_expired_or_none(monkeypatch):
from src.pages.compte import abonnement as compte_abonnement
assert compte_abonnement._show_active_view({"status": "failed"}) is False
assert compte_abonnement._show_active_view({"status": "expired"}) is False
assert compte_abonnement._show_active_view(None) is False