DEV: Improve specs and handle invalid email token

Follow-up to 7977b09025
This commit is contained in:
Gerhard Schlager
2018-12-11 18:04:07 +01:00
parent 8c227715ae
commit 688755baf2
3 changed files with 24 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ InviteRedeemer = Struct.new(:invite, :username, :name, :password, :user_custom_f
user.save!
if invite.via_email
user.email_tokens.create(email: user.email)
user.email_tokens.create!(email: user.email)
user.activate
end