require "application_system_test_case" class SessionsTest < ApplicationSystemTestCase setup do @user = users(:one) end test "should create session" do 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 assert_text "Session was successfully destroyed" end end