Scaffold session controller for relevant methods

This commit is contained in:
Andrew Tomaka 2024-08-01 21:34:58 -04:00
parent 76918fff3e
commit 4a01b42b76
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
9 changed files with 134 additions and 1 deletions

View file

@ -0,0 +1,25 @@
require "application_system_test_case"
class SessionsTest < ApplicationSystemTestCase
setup do
@user = users(:one)
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"
assert_text "Session was successfully created"
end
test "should destroy Session" do
visit root_url
click_on "Log out", match: :first
assert_text "Session was successfully destroyed"
end
end