Merged r21488 and r21489 to 4.1-stable (#36593).

git-svn-id: https://svn.redmine.org/redmine/branches/4.1-stable@21492 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2022-03-22 06:52:50 +00:00
parent ad308fbff7
commit eaa8582651
2 changed files with 18 additions and 0 deletions

View File

@@ -344,6 +344,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)