mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 11:25:55 +01:00
Fixed: Unable to change locked, sticky flags and board when editing a message (#10564).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9350 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -131,6 +131,30 @@ class MessagesControllerTest < ActionController::TestCase
|
||||
assert_equal 'New body', message.content
|
||||
end
|
||||
|
||||
def test_post_edit_sticky_and_locked
|
||||
@request.session[:user_id] = 2
|
||||
post :edit, :board_id => 1, :id => 1,
|
||||
:message => { :subject => 'New subject',
|
||||
:content => 'New body',
|
||||
:locked => '1',
|
||||
:sticky => '1'}
|
||||
assert_redirected_to '/boards/1/topics/1'
|
||||
message = Message.find(1)
|
||||
assert_equal true, message.sticky?
|
||||
assert_equal true, message.locked?
|
||||
end
|
||||
|
||||
def test_post_edit_should_allow_to_change_board
|
||||
@request.session[:user_id] = 2
|
||||
post :edit, :board_id => 1, :id => 1,
|
||||
:message => { :subject => 'New subject',
|
||||
:content => 'New body',
|
||||
:board_id => 2}
|
||||
assert_redirected_to '/boards/2/topics/1'
|
||||
message = Message.find(1)
|
||||
assert_equal Board.find(2), message.board
|
||||
end
|
||||
|
||||
def test_reply
|
||||
@request.session[:user_id] = 2
|
||||
post :reply, :board_id => 1, :id => 1, :reply => { :content => 'This is a test reply', :subject => 'Test reply' }
|
||||
|
||||
Reference in New Issue
Block a user