diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-07 12:34:52 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-07 12:34:52 +0000 |
commit | 81cf6b23439705231e1b3655709b3d3cae43a9cd (patch) | |
tree | a5df6e34e896adba499bd536c2d3fa3e1973d752 /test/integration/api_test/issues_test.rb | |
parent | 3dd97a87c6707eb53410814a9594b6eebbc130ec (diff) | |
download | redmine-81cf6b23439705231e1b3655709b3d3cae43a9cd.tar.gz redmine-81cf6b23439705231e1b3655709b3d3cae43a9cd.zip |
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
Diffstat (limited to 'test/integration/api_test/issues_test.rb')
-rw-r--r-- | test/integration/api_test/issues_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb index 9244ba5b5..0b7593e3f 100644 --- a/test/integration/api_test/issues_test.rb +++ b/test/integration/api_test/issues_test.rb @@ -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 => ''}} |