auth_fc: set the created user in the registration mail template context (#72358)
This commit is contained in:
parent
210f6bdf01
commit
5dddd1c674
|
@ -498,6 +498,7 @@ class LoginOrLinkView(View):
|
|||
user,
|
||||
template_names=['authentic2_auth_fc/registration_success'],
|
||||
context={
|
||||
'user': user,
|
||||
'login_url': request.build_absolute_uri(settings.LOGIN_URL),
|
||||
},
|
||||
request=self.request,
|
||||
|
|
|
@ -126,7 +126,7 @@ def test_create(settings, app, franceconnect, hooks, service, mailoutbox):
|
|||
assert len(mailoutbox) == 1
|
||||
assert mailoutbox[0].subject == 'Account creation using FranceConnect'
|
||||
for body in (mailoutbox[0].body, mailoutbox[0].alternatives[0][0]):
|
||||
assert 'Hi AnonymousUser,' in body
|
||||
assert 'Hi john.doe@example.com,' in body
|
||||
assert 'You have just created an account using FranceConnect.' in body
|
||||
assert 'https://testserver/login/' in body
|
||||
|
||||
|
|
Loading…
Reference in New Issue