summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-03-01 18:29:18 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-03-01 18:29:18 +0000
commitf5f5a5f64f2952340083c1286e0e0e8b35ca2931 (patch)
tree03ed14742922fd3560d954c20883450c33802262 /test
parent8699e5bbcd57de4a5d2300786f15b546b3a882a1 (diff)
downloadredmine-f5f5a5f64f2952340083c1286e0e0e8b35ca2931.tar.gz
redmine-f5f5a5f64f2952340083c1286e0e0e8b35ca2931.zip
Verify issues are updated by HTTP PUT only. Regression from r3486.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3520 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index fd9177a45..06f70c0a6 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -657,6 +657,20 @@ class IssuesControllerTest < ActionController::TestCase
assert_select_rjs :show, "update"
end
+ def test_update_using_invalid_http_verbs
+ @request.session[:user_id] = 2
+ subject = 'Updated by an invalid http verb'
+
+ get :update, :id => 1, :issue => {:subject => subject}
+ assert_not_equal subject, Issue.find(1).subject
+
+ post :update, :id => 1, :issue => {:subject => subject}
+ assert_not_equal subject, Issue.find(1).subject
+
+ delete :update, :id => 1, :issue => {:subject => subject}
+ assert_not_equal subject, Issue.find(1).subject
+ end
+
def test_put_update_without_custom_fields_param
@request.session[:user_id] = 2
ActionMailer::Base.deliveries.clear