@@ -65,7 +65,7 | |||||
65 | <%=h name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> |
|
65 | <%=h name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> | |
66 | </td> |
|
66 | </td> | |
67 | <% for status in @statuses -%> |
|
67 | <% for status in @statuses -%> | |
68 | <td class="<%= @permissions[status.id][field] %>"> |
|
68 | <td class="<%= @permissions[status.id][field].try(:join, ' ') %>"> | |
69 | <%= field_permission_tag(@permissions, status, field, @roles) %> |
|
69 | <%= field_permission_tag(@permissions, status, field, @roles) %> | |
70 | <% unless status == @statuses.last %><a href="#" class="repeat-value">»</a><% end %> |
|
70 | <% unless status == @statuses.last %><a href="#" class="repeat-value">»</a><% end %> | |
71 | </td> |
|
71 | </td> |
@@ -251,6 +251,15 class WorkflowsControllerTest < ActionController::TestCase | |||||
251 | assert_equal IssueStatus.sorted.all, assigns(:statuses) |
|
251 | assert_equal IssueStatus.sorted.all, assigns(:statuses) | |
252 | end |
|
252 | end | |
253 |
|
253 | |||
|
254 | def test_get_permissions_should_set_css_class | |||
|
255 | WorkflowPermission.delete_all | |||
|
256 | WorkflowPermission.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :field_name => 'assigned_to_id', :rule => 'required') | |||
|
257 | ||||
|
258 | get :permissions, :role_id => 1, :tracker_id => 2 | |||
|
259 | assert_response :success | |||
|
260 | assert_select 'td.required > select[name=?]', 'permissions[1][assigned_to_id]' | |||
|
261 | end | |||
|
262 | ||||
254 | def test_post_permissions |
|
263 | def test_post_permissions | |
255 | WorkflowPermission.delete_all |
|
264 | WorkflowPermission.delete_all | |
256 |
|
265 |
General Comments 0
You need to be logged in to leave comments.
Login now