summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test/issues_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/api_test/issues_test.rb')
-rw-r--r--test/integration/api_test/issues_test.rb16
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 => ''}}