diff test/functional/messages_controller_test.rb @ 51:371eac10df0b live

* Merge from "cannam" branch. This includes update to Redmine trunk, plus welcome/tip-of-the-day from luisf branch.
author Chris Cannam
date Wed, 24 Nov 2010 12:20:08 +0000
parents 94944d00e43c
children af80e5618e9b
line wrap: on
line diff
--- a/test/functional/messages_controller_test.rb	Thu Oct 21 11:19:14 2010 +0100
+++ b/test/functional/messages_controller_test.rb	Wed Nov 24 12:20:08 2010 +0000
@@ -87,7 +87,7 @@
                              :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 @@
     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 @@
     @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