Fix due to unit test when creating with invalid emails

This commit is contained in:
Fernando Olivares
2025-12-12 13:39:39 -06:00
committed by Stanko K.R.
parent fb487f598c
commit cddddcf83a
3 changed files with 18 additions and 8 deletions
+2 -3
View File
@@ -102,13 +102,12 @@ class MagicLinkApiTest < ActionDispatch::IntegrationTest
end
end
test "create session with invalid email via JSON still returns token to prevent enumeration" do
test "create session with invalid email via JSON" do
untenanted do
assert_no_difference -> { Identity.count } do
post session_path(format: :json), params: { email_address: "not-a-valid-email" }
end
assert_response :created
assert @response.parsed_body["pending_authentication_token"].present?
assert_response :unprocessable_entity
end
end