Sign up new users on sign in
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user