forked from fixin.me/fixin.me
Test "delete user"
This commit is contained in:
parent
c67820db58
commit
b781c7e072
@ -15,8 +15,10 @@
|
||||
<td class="svg">
|
||||
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
||||
</td>
|
||||
<td class="actions"><%= image_link_to "Delete", "account-remove-outline", user_path(user),
|
||||
data: { turbo: true, turbo_method: :delete } %></td>
|
||||
<td class="actions">
|
||||
<%= image_link_to t(:delete), "account-remove-outline", user_path(user),
|
||||
data: { turbo: true, turbo_method: :delete } %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
@ -23,6 +23,7 @@ en:
|
||||
application:
|
||||
users: Users
|
||||
actions: Actions
|
||||
delete: Delete
|
||||
or: or
|
||||
register: Register
|
||||
sign_in: Sign in
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user