Merge pull request #2164 from basecamp/flavorjones/user-validate-name
Validate User name presence and handle blank names gracefully
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user