Allows project to be changed from the regular issue update action (#4769, #9803).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8531 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-01-07 12:34:52 +00:00
parent 3dd97a87c6
commit 81cf6b2343
8 changed files with 160 additions and 23 deletions
+16
View File
@@ -455,6 +455,22 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
end
end
context "PUT /issues/3.xml with project change" do
setup do
@parameters = {:issue => {:project_id => 2, :subject => 'Project changed'}}
end
should "update project" do
assert_no_difference('Issue.count') do
put '/issues/3.xml', @parameters, credentials('jsmith')
end
issue = Issue.find(3)
assert_equal 2, issue.project_id
assert_equal 'Project changed', issue.subject
end
end
context "PUT /issues/6.xml with failed update" do
setup do
@parameters = {:issue => {:subject => ''}}