Fix a gestionnaire sign in bug
This commit is contained in:
parent
ed66013be7
commit
03eb47016c
3 changed files with 11 additions and 10 deletions
|
@ -27,10 +27,11 @@ module FeatureHelpers
|
|||
|
||||
if sign_in_by_link
|
||||
mail = ActionMailer::Base.deliveries.last
|
||||
message = mail.body.parts.join(&:to_s)
|
||||
login_token = message[/connexion-par-jeton\/(.*)/, 1]
|
||||
message = mail.html_part.body.raw_source
|
||||
gestionnaire_id = message[/\".+\/connexion-par-jeton\/(.+)\?jeton=(.*)\"/, 1]
|
||||
jeton = message[/\".+\/connexion-par-jeton\/(.+)\?jeton=(.*)\"/, 2]
|
||||
|
||||
visit sign_in_by_link_path(login_token)
|
||||
visit sign_in_by_link_path(gestionnaire_id, jeton: jeton)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue