Adds posts quoting functionality (#1825).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1772 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-08-28 18:56:47 +00:00
parent 8f3a04ce69
commit bfd0fb067a
33 changed files with 69 additions and 1 deletions

View File

@@ -40,6 +40,15 @@ class MessagesControllerTest < Test::Unit::TestCase
assert_not_nil assigns(:topic)
end
def test_show_with_reply_permission
@request.session[:user_id] = 2
get :show, :board_id => 1, :id => 1
assert_response :success
assert_template 'show'
assert_tag :div, :attributes => { :id => 'reply' },
:descendant => { :tag => 'textarea', :attributes => { :id => 'message_content' } }
end
def test_show_message_not_found
get :show, :board_id => 1, :id => 99999
assert_response 404
@@ -108,4 +117,11 @@ class MessagesControllerTest < Test::Unit::TestCase
assert_redirected_to 'boards/show'
assert_nil Message.find_by_id(1)
end
def test_quote
@request.session[:user_id] = 2
xhr :get, :quote, :board_id => 1, :id => 3
assert_response :success
assert_select_rjs :show, 'reply'
end
end