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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user