Configure tests and helpers for current backend state

This commit is contained in:
hannah.dagemark 2025-05-09 14:58:37 +02:00 committed by Hannah Dagemark
commit 4edae5e7bb
9 changed files with 85 additions and 11 deletions

View file

@ -0,0 +1,19 @@
require "test_helper"
class SessionsControllerTest < ActionDispatch::IntegrationTest
test "should get new" do
get new_sessions_path
assert_response :success
end
test "should get create" do
post sessions_path, params: { email: "test@email.com", password: "testpassword" }
assert_redirected_to root_path
end
test "should get destroy" do
post sessions_path, params: { email: "test@email.com", password: "testpassword" }
delete sessions_path
assert_redirected_to root_path
end
end