From 81cf6b23439705231e1b3655709b3d3cae43a9cd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 7 Jan 2012 12:34:52 +0000 Subject: 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 --- test/integration/api_test/issues_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/integration/api_test/issues_test.rb') 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 => ''}} -- cgit v1.2.3