Sign up new users on sign in

This commit is contained in:
Stanko K.R.
2025-12-04 11:30:21 +01:00
parent 06478f23d2
commit a8f328c921
2 changed files with 14 additions and 6 deletions
+6 -3
View File
@@ -24,12 +24,15 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest
test "create for a new user" do
untenanted do
assert_no_difference -> { MagicLink.count } do
post session_path,
params: { email_address: "nonexistent-#{SecureRandom.hex(6)}@example.com" }
assert_difference -> { MagicLink.count }, +1 do
assert_difference -> { Identity.count }, +1 do
post session_path,
params: { email_address: "nonexistent-#{SecureRandom.hex(6)}@example.com" }
end
end
assert_redirected_to session_magic_link_path
assert MagicLink.last.for_sign_up?
end
end