##// END OF EJS Templates
Merged r14160 (#19580)....
Jean-Philippe Lang -
r13831:490052575639
parent child
Show More
@@ -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">&#187;</a><% end %>
70 <% unless status == @statuses.last %><a href="#" class="repeat-value">&#187;</a><% end %>
71 </td>
71 </td>
@@ -257,6 +257,15 class WorkflowsControllerTest < ActionController::TestCase
257 assert_equal IssueStatus.sorted.to_a, assigns(:statuses)
257 assert_equal IssueStatus.sorted.to_a, assigns(:statuses)
258 end
258 end
259
259
260 def test_get_permissions_should_set_css_class
261 WorkflowPermission.delete_all
262 WorkflowPermission.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :field_name => 'assigned_to_id', :rule => 'required')
263
264 get :permissions, :role_id => 1, :tracker_id => 2
265 assert_response :success
266 assert_select 'td.required > select[name=?]', 'permissions[1][assigned_to_id]'
267 end
268
260 def test_post_permissions
269 def test_post_permissions
261 WorkflowPermission.delete_all
270 WorkflowPermission.delete_all
262
271
General Comments 0
You need to be logged in to leave comments. Login now