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">
|
<td class="svg">
|
||||||
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
||||||
</td>
|
</td>
|
||||||
<td class="actions"><%= image_link_to "Delete", "account-remove-outline", user_path(user),
|
<td class="actions">
|
||||||
data: { turbo: true, turbo_method: :delete } %></td>
|
<%= image_link_to t(:delete), "account-remove-outline", user_path(user),
|
||||||
|
data: { turbo: true, turbo_method: :delete } %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
|
@ -23,6 +23,7 @@ en:
|
|||||||
application:
|
application:
|
||||||
users: Users
|
users: Users
|
||||||
actions: Actions
|
actions: Actions
|
||||||
|
delete: Delete
|
||||||
or: or
|
or: or
|
||||||
register: Register
|
register: Register
|
||||||
sign_in: Sign in
|
sign_in: Sign in
|
||||||
|
@ -92,4 +92,18 @@ class UsersTest < ApplicationSystemTestCase
|
|||||||
visit Capybara.string(mail.body.to_s).find_link("Confirm my account")[:href]
|
visit Capybara.string(mail.body.to_s).find_link("Confirm my account")[:href]
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user