diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-06 21:36:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-06 21:36:28 +0000 |
commit | 2bcf9f28710b527ff9efbc68fc228593a243e65f (patch) | |
tree | 91918fb8f994a06cb0b770a11cfb3db7e2102187 /test/functional/boards_controller_test.rb | |
parent | 87356648f659c8ed9e1310b81a77e7fdeec332af (diff) | |
download | redmine-2bcf9f28710b527ff9efbc68fc228593a243e65f.tar.gz redmine-2bcf9f28710b527ff9efbc68fc228593a243e65f.zip |
Prevent mass-assignment when adding/updating a forum (#10390).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9140 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/boards_controller_test.rb')
-rw-r--r-- | test/functional/boards_controller_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/boards_controller_test.rb b/test/functional/boards_controller_test.rb index c848b3e1a..03dee9de8 100644 --- a/test/functional/boards_controller_test.rb +++ b/test/functional/boards_controller_test.rb @@ -122,6 +122,14 @@ class BoardsControllerTest < ActionController::TestCase assert_equal 'Testing', Board.find(2).name end + def test_update_position + @request.session[:user_id] = 2 + put :update, :project_id => 1, :id => 2, :board => { :move_to => 'highest'} + assert_redirected_to '/projects/ecookbook/settings/boards' + board = Board.find(2) + assert_equal 1, board.position + end + def test_update_with_failure @request.session[:user_id] = 2 put :update, :project_id => 1, :id => 2, :board => { :name => '', :description => 'Testing board update'} |