diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-03-21 22:13:19 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-03-21 22:13:19 +0000 |
commit | 81575e7291adee92ecaa0757c1859d66506c66bf (patch) | |
tree | 89ff4560a1f41cabaccd89048c99f9d25a4015dc /test/unit/project_test.rb | |
parent | 72bebd1d45664f66405aa0717a3da09878628dae (diff) | |
download | redmine-81575e7291adee92ecaa0757c1859d66506c66bf.tar.gz redmine-81575e7291adee92ecaa0757c1859d66506c66bf.zip |
Skip validation of required custom fields when creating a project if user does not have permissions to see those custom fields (#36593).
Patch by mathieu-mbru.
git-svn-id: https://svn.redmine.org/redmine/trunk@21488 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r-- | test/unit/project_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index cf457a48c..bf77b6235 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -358,6 +358,13 @@ class ProjectTest < ActiveSupport::TestCase assert_equal parent.children.sort_by(&:name), parent.children.to_a end + def test_validate_custom_field_values_of_project + User.current = User.find(3) + ProjectCustomField.generate!(:name => 'CustomFieldTest', :field_format => 'int', :is_required => true, :visible => false, :role_ids => [1]) + p = Project.new(:name => 'Project test', :identifier => 'project-t') + assert p.save! + end + def test_set_parent_should_update_issue_fixed_version_associations_when_a_fixed_version_is_moved_out_of_the_hierarchy # Parent issue with a hierarchy project's fixed version parent_issue = Issue.find(1) |