mirror of
https://github.com/simple-login/app.git
synced 2024-11-13 07:31:12 +01:00
Activate users created with account link (#1124)
This commit is contained in:
parent
9abb8aa47f
commit
d06470a3c6
2 changed files with 3 additions and 0 deletions
|
@ -129,6 +129,7 @@ class NewUserStrategy(ClientMergeStrategy):
|
|||
email=self.link_request.email,
|
||||
name=self.link_request.name,
|
||||
password=random_string(20),
|
||||
activated=True,
|
||||
from_partner=self.link_request.from_partner,
|
||||
)
|
||||
partner_user = PartnerUser.create(
|
||||
|
|
|
@ -89,6 +89,7 @@ def test_login_case_from_partner():
|
|||
assert User.FLAG_CREATED_FROM_PARTNER == (
|
||||
res.user.flags & User.FLAG_CREATED_FROM_PARTNER
|
||||
)
|
||||
assert res.user.activated is True
|
||||
|
||||
|
||||
def test_login_case_from_web():
|
||||
|
@ -104,6 +105,7 @@ def test_login_case_from_web():
|
|||
assert res.strategy == NewUserStrategy.__name__
|
||||
assert res.user is not None
|
||||
assert 0 == (res.user.flags & User.FLAG_CREATED_FROM_PARTNER)
|
||||
assert res.user.activated is True
|
||||
|
||||
|
||||
def test_get_strategy_existing_sl_user():
|
||||
|
|
Loading…
Reference in a new issue