Defect #43282 » 43282.patch
| app/views/users/_list.html.erb | ||
|---|---|---|
| 31 | 31 |
</td> |
| 32 | 32 |
</tr> |
| 33 | 33 |
<% end %> |
| 34 |
<tr id="user-<%= user.id %>" class="user <%= cycle("odd", "even") %> hascontextmenu">
|
|
| 34 |
<tr id="user-<%= user.id %>" class="hascontextmenu <%= cycle("odd", "even") %> <%= user.css_classes %>">
|
|
| 35 | 35 |
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", user.id, false, id: nil) %></td>
|
| 36 | 36 |
<% @query.inline_columns.each do |column| %> |
| 37 | 37 |
<% if column.name == :login %> |
| test/functional/users_controller_test.rb | ||
|---|---|---|
| 33 | 33 |
active = User.active.first |
| 34 | 34 |
locked = User.where(status: User::STATUS_LOCKED).first |
| 35 | 35 |
assert_select 'table.users' |
| 36 |
assert_select "tr#user-#{active.id}"
|
|
| 36 |
assert_select "tr.user.active#user-#{active.id}"
|
|
| 37 | 37 |
assert_select "tr#user-#{locked.id}", 0
|
| 38 | 38 |
end |
| 39 | 39 | |
| 40 | 40 |
def test_index_with_status_filter |
| 41 | 41 |
get :index, params: { set_filter: 1, f: ['status'], op: {status: '='}, v: {status: [3]} }
|
| 42 | 42 |
assert_response :success |
| 43 |
assert_select "tr.user", User.where(status: 3).count |
|
| 43 |
assert_select "tr.user.locked", User.where(status: 3).count
|
|
| 44 | 44 |
end |
| 45 | 45 | |
| 46 | 46 |
def test_index_with_firstname_filter |
- « Previous
- 1
- 2
- 3
- Next »