Use _path in all cases where we are not potentially changing the domain

This commit is contained in:
David Heinemeier Hansson
2025-04-13 08:17:36 +02:00
parent 7b60748796
commit dbf61f4fc3
28 changed files with 82 additions and 82 deletions
@@ -8,7 +8,7 @@ class Users::RolesControllerTest < ActionDispatch::IntegrationTest
test "update" do
assert_not users(:david).admin?
put user_role_url(users(:david)), params: { user: { role: "admin" } }
put user_role_path(users(:david)), params: { user: { role: "admin" } }
assert_redirected_to users_path
assert users(:david).reload.admin?
@@ -16,7 +16,7 @@ class Users::RolesControllerTest < ActionDispatch::IntegrationTest
test "can't promote to special roles" do
assert_no_changes -> { users(:david).reload.role } do
put user_role_url(users(:david)), params: { user: { role: "system" } }
put user_role_path(users(:david)), params: { user: { role: "system" } }
end
end
end