test(abonnement): adapter les tests de _reabo_button à sa nouvelle signature

_reabo_button() ne prend plus has_used_trial (bouton de réabonnement
simplifié) ; les deux anciens tests testant M'abonner/Me réabonner
sont remplacés par un test du comportement actuel.
This commit is contained in:
Colin Maudry
2026-07-06 11:01:32 +02:00
parent 92e30979d9
commit 2150ade42b
+4 -13
View File
@@ -1,18 +1,9 @@
def test_reabo_button_never_subscribed():
def test_reabo_button_links_to_abonnement_page():
from src.pages.compte import abonnement as compte_abonnement
text = str(compte_abonnement._reabo_button(has_used_trial=False))
assert "M'abonner" in text
assert "Me réabonner" not in text
assert "href='/a-propos/abonnement'" in text
def test_reabo_button_former_subscriber():
from src.pages.compte import abonnement as compte_abonnement
text = str(compte_abonnement._reabo_button(has_used_trial=True))
assert "Me réabonner" in text
assert "href='/a-propos/abonnement'" in text
text = str(compte_abonnement._reabo_button())
assert "Abonnez-vous" in text
assert "/a-propos/abonnement" in text
def test_active_view_shows_cancel(monkeypatch):