Check authentication on each request (#26)

Reviewed-on: #26
This commit is contained in:
Andrew Tomaka 2024-08-16 19:59:29 -04:00
parent 96ca8b7e7c
commit 452be0c49c
10 changed files with 59 additions and 10 deletions

View file

@ -6,17 +6,14 @@ 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
login(@user.email)
visit root_url
click_on "Log out", match: :first