summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-15 16:57:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-15 16:57:04 +0000
commite23511076cd7dc2f4f471c483d75df8130f2ce4a (patch)
tree2962d61bcf32adeb9f7d020bc47b2f3258ac337d /test
parent072475b8a5bce6a05a6d6b18b4240d81def6fad8 (diff)
downloadredmine-e23511076cd7dc2f4f471c483d75df8130f2ce4a.tar.gz
redmine-e23511076cd7dc2f4f471c483d75df8130f2ce4a.zip
No blank option for custom fields marked as required on workflow settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10001 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/workflows_controller_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb
index 0a35df5df..32ac03b97 100644
--- a/test/functional/workflows_controller_test.rb
+++ b/test/functional/workflows_controller_test.rb
@@ -191,6 +191,22 @@ class WorkflowsControllerTest < ActionController::TestCase
end
end
+ def test_get_permissions_with_always_required_custom_field
+ cf = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :tracker_ids => [1], :is_required => true)
+
+ get :permissions, :role_id => 1, :tracker_id => 1
+ assert_response :success
+ assert_template 'permissions'
+
+ # Custom field that is always required
+ # The default option is "(Required)"
+ assert_select 'select[name=?]', "permissions[#{cf.id}][3]" do
+ assert_select 'option[value=]', :text => '(Required)'
+ assert_select 'option[value=readonly]', :text => 'Read-only'
+ assert_select 'option[value=required]', 0
+ end
+ end
+
def test_get_permissions_with_role_and_tracker_and_all_statuses
WorkflowTransition.delete_all