2024-08-01 21:41:42 -04:00
|
|
|
require "application_system_test_case"
|
|
|
|
|
|
|
|
class SessionsTest < ApplicationSystemTestCase
|
|
|
|
setup do
|
|
|
|
@user = users(:one)
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should create session" do
|
2024-08-16 19:59:29 -04:00
|
|
|
login(@user.email)
|
2024-08-01 21:41:42 -04:00
|
|
|
|
|
|
|
assert_text "Session was successfully created"
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should destroy Session" do
|
2024-08-16 19:59:29 -04:00
|
|
|
login(@user.email)
|
|
|
|
|
2024-08-01 21:41:42 -04:00
|
|
|
visit root_url
|
|
|
|
click_on "Log out", match: :first
|
|
|
|
|
|
|
|
assert_text "Session was successfully destroyed"
|
|
|
|
end
|
|
|
|
end
|