replace filter+first with find
This commit is contained in:
parent
dfd2c1ee79
commit
f3e487bd9e
3 changed files with 8 additions and 16 deletions
|
@ -213,8 +213,7 @@ feature 'The routing', js: true do
|
|||
|
||||
def register_instructeur_and_log_in(email)
|
||||
confirmation_email = emails_sent_to(email)
|
||||
.filter { |m| m.subject == 'Activez votre compte instructeur' }
|
||||
.first
|
||||
.find { |m| m.subject == 'Activez votre compte instructeur' }
|
||||
token_params = confirmation_email.body.match(/token=[^"]+/)
|
||||
|
||||
visit "users/activate?#{token_params}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue