From f4ef9c95808c16326e415324d72854eefef23e1d Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Fri, 12 Dec 2025 07:16:07 +0100 Subject: [PATCH] Test that you can't go to the magic link screen without an email --- test/controllers/sessions/magic_links_controller_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/controllers/sessions/magic_links_controller_test.rb b/test/controllers/sessions/magic_links_controller_test.rb index f2316ed51..5a4a48e51 100644 --- a/test/controllers/sessions/magic_links_controller_test.rb +++ b/test/controllers/sessions/magic_links_controller_test.rb @@ -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