Make login through form in tests more readable
We're removing the word "email" from the method name because the method
was accepting either an email or a username, and we're using the name of
the label to fill in fields, which is better because it checks that the
label is correctly associated with the field , as shown for instance in
commit 431ebeda8.
This commit is contained in:
@@ -42,7 +42,7 @@ describe "Account" do
|
||||
|
||||
logout
|
||||
|
||||
login_through_form_with_email_and_password(user.email, "new_password")
|
||||
login_through_form_with(user.email, password: "new_password")
|
||||
|
||||
expect(page).to have_content "You have been signed in successfully."
|
||||
end
|
||||
@@ -63,7 +63,7 @@ describe "Account" do
|
||||
|
||||
logout
|
||||
|
||||
login_through_form_with_email_and_password(user.username, new_password)
|
||||
login_through_form_with(user.username, password: new_password)
|
||||
|
||||
expect(page).to have_content "You have been signed in successfully."
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user