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.
This commit is contained in:
Javi Martín
2025-03-13 01:45:08 +01:00
parent 55a5cef783
commit fa9ab61f72

View File

@@ -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)