From 094e7728979a8e974ef46da1e6c4461e71c77510 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 25 Apr 2015 07:46:28 +0000 Subject: [PATCH] Merged r14160 (#19580). git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@14212 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/workflows/permissions.html.erb | 2 +- test/functional/workflows_controller_test.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/workflows/permissions.html.erb b/app/views/workflows/permissions.html.erb index 54b8304ce..9a9c024d3 100644 --- a/app/views/workflows/permissions.html.erb +++ b/app/views/workflows/permissions.html.erb @@ -65,7 +65,7 @@ <%=h name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> <% for status in @statuses -%> - + <%= field_permission_tag(@permissions, status, field, @roles) %> <% unless status == @statuses.last %>»<% end %> diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index 2ce967bb0..5f11d699b 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -251,6 +251,15 @@ class WorkflowsControllerTest < ActionController::TestCase assert_equal IssueStatus.sorted.all, assigns(:statuses) end + def test_get_permissions_should_set_css_class + WorkflowPermission.delete_all + WorkflowPermission.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :field_name => 'assigned_to_id', :rule => 'required') + + get :permissions, :role_id => 1, :tracker_id => 2 + assert_response :success + assert_select 'td.required > select[name=?]', 'permissions[1][assigned_to_id]' + end + def test_post_permissions WorkflowPermission.delete_all -- 2.39.5