users: fix name changes not being validated.
Fix names not being validated when a user changes their name. Regression in 5ce724f1e.
This commit is contained in:
@@ -28,6 +28,14 @@ class UserNameChangeRequestsControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_redirected_to profile_path
|
||||
assert_equal("zun", @user.reload.name)
|
||||
end
|
||||
|
||||
should "fail if the new name is invalid" do
|
||||
assert_no_changes(-> { @user.reload.name }) do
|
||||
post_auth user_name_change_requests_path, @user, params: { user_name_change_request: { desired_name: "foo__bar" }}
|
||||
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "show action" do
|
||||
|
||||
Reference in New Issue
Block a user