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
This commit is contained in:
Jean-Philippe Lang
2012-03-06 21:36:28 +00:00
parent 87356648f6
commit 2bcf9f2871
3 changed files with 17 additions and 3 deletions
@@ -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'}