budget/test/system/sessions_test.rb

25 lines
514 B
Ruby

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