Merged r9404, r9405 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9411 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-04-14 06:54:02 +00:00
parent 2c0ba78f70
commit fd450fd2da
5 changed files with 120 additions and 37 deletions

View File

@@ -395,6 +395,14 @@ class IssueTest < ActiveSupport::TestCase
assert_equal expected_statuses, issue.new_statuses_allowed_to(admin)
end
def test_new_statuses_allowed_to_should_return_default_and_current_status_when_copying
issue = Issue.find(1).copy
assert_equal [1], issue.new_statuses_allowed_to(User.find(2)).map(&:id)
issue = Issue.find(2).copy
assert_equal [1, 2], issue.new_statuses_allowed_to(User.find(2)).map(&:id)
end
def test_copy
issue = Issue.new.copy_from(1)
assert issue.copy?