Fix due to unit test when creating with invalid emails
This commit is contained in:
committed by
Stanko K.R.
parent
fb487f598c
commit
cddddcf83a
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user