Merge pull request #2164 from basecamp/flavorjones/user-validate-name

Validate User name presence and handle blank names gracefully
This commit is contained in:
Mike Dalessio
2025-12-16 10:49:13 -05:00
committed by GitHub
4 changed files with 29 additions and 3 deletions
@@ -29,7 +29,7 @@ class Signup::CompletionsControllerTest < ActionDispatch::IntegrationTest
assert_response :redirect, "Valid params should redirect"
end
test "create with invalid params" do
test "create with blank name" do
untenanted do
post signup_completion_path, params: {
signup: {
@@ -38,6 +38,9 @@ class Signup::CompletionsControllerTest < ActionDispatch::IntegrationTest
}
end
assert_response :unprocessable_entity, "Invalid params should return unprocessable entity"
assert_response :unprocessable_entity
assert_select ".txt-negative" do
assert_select "li", text: "Full name can't be blank"
end
end
end