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:
@@ -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
|
from src.pages.compte import abonnement as compte_abonnement
|
||||||
|
|
||||||
text = str(compte_abonnement._reabo_button(has_used_trial=False))
|
text = str(compte_abonnement._reabo_button())
|
||||||
assert "M'abonner" in text
|
assert "Abonnez-vous" in text
|
||||||
assert "Me réabonner" not in text
|
assert "/a-propos/abonnement" 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
|
|
||||||
|
|
||||||
|
|
||||||
def test_active_view_shows_cancel(monkeypatch):
|
def test_active_view_shows_cancel(monkeypatch):
|
||||||
|
|||||||
Reference in New Issue
Block a user