From fa9ab61f72101d98be759fbc069d400395f192c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 13 Mar 2025 01:45:08 +0100 Subject: [PATCH] Simplify login through form as user in tests The logic was almost the same as the method to login with an email and a password. --- spec/support/common_actions/users.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spec/support/common_actions/users.rb b/spec/support/common_actions/users.rb index 20b024c3d..fc59ab303 100644 --- a/spec/support/common_actions/users.rb +++ b/spec/support/common_actions/users.rb @@ -25,13 +25,7 @@ module Users end def login_through_form_as(user) - visit root_path - click_link "Sign in" - - fill_in "user_login", with: user.email - fill_in "user_password", with: user.password - - click_button "Enter" + login_through_form_with_email_and_password(user.email, user.password) end def login_through_form_as_officer(officer)