diff --git a/app/views/management/users/_erase_user_account.html.erb b/app/views/management/users/_erase_user_account.html.erb index 5746e103a..f7089203a 100644 --- a/app/views/management/users/_erase_user_account.html.erb +++ b/app/views/management/users/_erase_user_account.html.erb @@ -5,5 +5,5 @@ <%= t("management.users.erase_warning") %> - <%= link_to t("management.users.erase_submit"), erase_management_users_path, method: :delete, class: "button hollow alert", data: { confirm: t("management.users.erase_account_confirm") } %> + <%= button_to t("management.users.erase_submit"), erase_management_users_path, method: :delete, class: "button hollow alert", data: { confirm: t("management.users.erase_account_confirm") } %> diff --git a/spec/system/management/users_spec.rb b/spec/system/management/users_spec.rb index 2291e9f56..fccf14b29 100644 --- a/spec/system/management/users_spec.rb +++ b/spec/system/management/users_spec.rb @@ -82,7 +82,7 @@ describe "Users" do expect(page).to have_content "This user can participate in the website with the following permissions" click_link "Delete user" - accept_confirm { click_link "Delete account" } + accept_confirm { click_button "Delete account" } expect(page).to have_content "User account deleted."