Adds a test for when displaying the new message form on boards#show.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9019 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-02-27 15:11:50 +00:00
parent 0d2a22f37a
commit 4384db597c
1 changed files with 10 additions and 0 deletions

View File

@ -55,6 +55,16 @@ class BoardsControllerTest < ActionController::TestCase
assert_not_nil assigns(:topics) assert_not_nil assigns(:topics)
end end
def test_show_with_permission_should_display_the_new_message_form
@request.session[:user_id] = 2
get :show, :project_id => 1, :id => 1
assert_response :success
assert_template 'show'
assert_tag 'form', :attributes => {:id => 'message-form'}
assert_tag 'input', :attributes => {:name => 'message[subject]'}
end
def test_show_atom def test_show_atom
get :show, :project_id => 1, :id => 1, :format => 'atom' get :show, :project_id => 1, :id => 1, :format => 'atom'
assert_response :success assert_response :success