Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2493 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-02-21 11:04:50 +00:00
parent 9a986ac0a5
commit fe28193e4e
237 changed files with 27994 additions and 32194 deletions
+4 -4
View File
@@ -87,9 +87,9 @@ class MessagesControllerTest < Test::Unit::TestCase
post :new, :board_id => 1,
:message => { :subject => 'Test created message',
:content => 'Message body'}
assert_redirected_to 'messages/show'
message = Message.find_by_subject('Test created message')
assert_not_nil message
assert_redirected_to "boards/1/topics/#{message.to_param}"
assert_equal 'Message body', message.content
assert_equal 2, message.author_id
assert_equal 1, message.board_id
@@ -127,7 +127,7 @@ class MessagesControllerTest < Test::Unit::TestCase
post :edit, :board_id => 1, :id => 1,
:message => { :subject => 'New subject',
:content => 'New body'}
assert_redirected_to 'messages/show'
assert_redirected_to 'boards/1/topics/1'
message = Message.find(1)
assert_equal 'New subject', message.subject
assert_equal 'New body', message.content
@@ -143,7 +143,7 @@ class MessagesControllerTest < Test::Unit::TestCase
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' }
assert_redirected_to 'messages/show'
assert_redirected_to 'boards/1/topics/1'
assert Message.find_by_subject('Test reply')
end
@@ -157,7 +157,7 @@ class MessagesControllerTest < Test::Unit::TestCase
def test_destroy_topic
@request.session[:user_id] = 2
post :destroy, :board_id => 1, :id => 1
assert_redirected_to 'boards/show'
assert_redirected_to 'projects/ecookbook/boards/1'
assert_nil Message.find_by_id(1)
end