Pull out login helper
This commit is contained in:
parent
28620e27d7
commit
61f3d34653
2 changed files with 13 additions and 13 deletions
|
@ -6,24 +6,13 @@ class SessionsTest < ApplicationSystemTestCase
|
|||
end
|
||||
|
||||
test "should create session" do
|
||||
visit new_session_url
|
||||
|
||||
fill_in "Email", with: @user.email
|
||||
fill_in "Password", with: "secret"
|
||||
|
||||
click_on "Create Session"
|
||||
login(@user.email)
|
||||
|
||||
assert_text "Session was successfully created"
|
||||
end
|
||||
|
||||
test "should destroy Session" do
|
||||
visit new_session_url
|
||||
|
||||
fill_in "Email", with: @user.email
|
||||
fill_in "Password", with: "secret"
|
||||
|
||||
click_on "Create Session"
|
||||
assert_text "Session was successfully created"
|
||||
login(@user.email)
|
||||
|
||||
visit root_url
|
||||
click_on "Log out", match: :first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue