summaryrefslogtreecommitdiffstats
path: root/test/unit/project_test.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-03-22 06:52:09 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-03-22 06:52:09 +0000
commita87f724ad529e71386352f0b38d52185ba7f052c (patch)
tree96fb5f5b1d12103183cf47cb972ce3fc6520b72e /test/unit/project_test.rb
parent0bbc2d50a796653691a812edcf0ea4f27e29b456 (diff)
downloadredmine-a87f724ad529e71386352f0b38d52185ba7f052c.tar.gz
redmine-a87f724ad529e71386352f0b38d52185ba7f052c.zip
Merged r21488 and r21489 to 4.2-stable (#36593).
git-svn-id: https://svn.redmine.org/redmine/branches/4.2-stable@21491 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r--test/unit/project_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 63f1e01b7..10d55b999 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -348,6 +348,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)