diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-14 16:45:32 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-11-14 16:45:32 +0000 |
commit | 2fab7bd9b1f16d8e8c352dfe0c13d80ff896ea76 (patch) | |
tree | 498b1dbed91edb965db8a1cb46fc6e310fd2681e /test/functional/messages_controller_test.rb | |
parent | 2ee45e8cac909991ddf782a8d2947ae99473404a (diff) | |
download | redmine-2fab7bd9b1f16d8e8c352dfe0c13d80ff896ea76.tar.gz redmine-2fab7bd9b1f16d8e8c352dfe0c13d80ff896ea76.zip |
Adds leading slash to all assert_redirected_to arguments (#6887).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4407 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/messages_controller_test.rb')
-rw-r--r-- | test/functional/messages_controller_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/messages_controller_test.rb b/test/functional/messages_controller_test.rb index d614bc843..59dc704e4 100644 --- a/test/functional/messages_controller_test.rb +++ b/test/functional/messages_controller_test.rb @@ -87,7 +87,7 @@ class MessagesControllerTest < ActionController::TestCase :content => 'Message body'} message = Message.find_by_subject('Test created message') assert_not_nil message - assert_redirected_to "boards/1/topics/#{message.to_param}" + 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 @@ -114,7 +114,7 @@ class MessagesControllerTest < ActionController::TestCase post :edit, :board_id => 1, :id => 1, :message => { :subject => 'New subject', :content => 'New body'} - assert_redirected_to 'boards/1/topics/1' + assert_redirected_to '/boards/1/topics/1' message = Message.find(1) assert_equal 'New subject', message.subject assert_equal 'New body', message.content @@ -124,14 +124,14 @@ class MessagesControllerTest < ActionController::TestCase @request.session[:user_id] = 2 post :reply, :board_id => 1, :id => 1, :reply => { :content => 'This is a test reply', :subject => 'Test reply' } reply = Message.find(:first, :order => 'id DESC') - assert_redirected_to "boards/1/topics/1?r=#{reply.id}" + assert_redirected_to "/boards/1/topics/1?r=#{reply.id}" assert Message.find_by_subject('Test reply') end def test_destroy_topic @request.session[:user_id] = 2 post :destroy, :board_id => 1, :id => 1 - assert_redirected_to 'projects/ecookbook/boards/1' + assert_redirected_to '/projects/ecookbook/boards/1' assert_nil Message.find_by_id(1) end |