Test that you can't go to the magic link screen without an email

This commit is contained in:
Stanko K.R.
2025-12-12 07:16:07 +01:00
parent 0dccd7e19c
commit f4ef9c9580
@@ -5,6 +5,14 @@ class Sessions::MagicLinksControllerTest < ActionDispatch::IntegrationTest
untenanted do
get session_magic_link_url
assert_response :redirect, "Without an email address pending authentication, should redirect"
assert_redirected_to new_session_path
end
untenanted do
post session_path, params: { email_address: "test@example.com" }
get session_magic_link_url
assert_response :success
end
end