<div data-hook="admin_user_form_roles">
  <p>
    <%= label_tag nil, t(:roles) %><br />
    <% @roles.each do |role| %>
      <label class="sub">
        <%= check_box_tag 'user[role_ids][]', role.id, @user.roles.include?(role) %>
        <%= role.name %>
      </label> &nbsp;
    <% end %>
    <%= hidden_field_tag 'user[role_ids][]', '' %>
  </p>
</div>
<div data-hook="admin_user_form_roles">
  <p>
    <%= label_tag nil, t(:roles) %><br />
    <% @roles.each do |role| %>
      <label class="sub">
        <%= check_box_tag 'user[role_ids][]', role.id, @user.roles.include?(role), :id => "user_role_#{role.name}" %>
        <%= role.name %>
      </label> &nbsp;
    <% end %>
    <%= hidden_field_tag 'user[role_ids][]', '' %>
  </p>
</div>
Add :id to make the test passed
[auth] Add :id to make the test passed
