Merged r11843 from trunk (#13910).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11870 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-05-18 19:33:27 +00:00
parent af632568e3
commit a8c27df9fe
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -69,6 +69,19 @@ class ProjectCopyTest < ActiveSupport::TestCase
assert_equal "Closed", copied_issue.status.name
end
test "#copy should copy issues custom values" do
field = IssueCustomField.generate!(:is_for_all => true, :trackers => Tracker.all)
issue = Issue.generate!(:project => @source_project, :subject => 'Custom field copy')
issue.custom_field_values = {field.id => 'custom'}
issue.save!
assert_equal 'custom', issue.reload.custom_field_value(field)
assert @project.copy(@source_project)
copy = @project.issues.find_by_subject('Custom field copy')
assert copy
assert_equal 'custom', copy.reload.custom_field_value(field)
end
test "#copy should copy issues assigned to a locked version" do
User.current = User.find(1)
assigned_version = Version.generate!(:name => "Assigned Issues")