replace filter+first with find

This commit is contained in:
clemkeirua 2020-09-24 15:09:41 +02:00 committed by Keirua (Rebase PR Action)
parent dfd2c1ee79
commit f3e487bd9e
3 changed files with 8 additions and 16 deletions

View file

@ -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}"