diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index f353947..a240ef4 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -15,8 +15,10 @@
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
- <%= image_link_to "Delete", "account-remove-outline", user_path(user),
- data: { turbo: true, turbo_method: :delete } %> |
+
+ <%= image_link_to t(:delete), "account-remove-outline", user_path(user),
+ data: { turbo: true, turbo_method: :delete } %>
+ |
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 82841c9..1f1814f 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -23,6 +23,7 @@ en:
application:
users: Users
actions: Actions
+ delete: Delete
or: or
register: Register
sign_in: Sign in
diff --git a/test/system/users_test.rb b/test/system/users_test.rb
index 13431e7..3f19646 100644
--- a/test/system/users_test.rb
+++ b/test/system/users_test.rb
@@ -92,4 +92,18 @@ class UsersTest < ApplicationSystemTestCase
visit Capybara.string(mail.body.to_s).find_link("Confirm my account")[:href]
end
end
+
+ test "delete user" do
+ sign_in user: users.select(&:admin?).sample
+ click_link t('layouts.application.users')
+ assert_difference ->{ User.count }, -1 do
+ all('tr').drop(1).sample.click_link t(:delete)
+ end
+ end
+
+ test "users tab visible only for admin" do
+ end
+
+ test "update e-mail" do
+ end
end