summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-27 15:11:50 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-27 15:11:50 +0000
commit4384db597c5115bc98ec9c7d9f1d996c2506eb7b (patch)
treef723c77a3f9750a7e246e4a7254d987498c90d82
parent0d2a22f37a7e4ef1ca1ad5b9bb8758129c04ad18 (diff)
downloadredmine-4384db597c5115bc98ec9c7d9f1d996c2506eb7b.tar.gz
redmine-4384db597c5115bc98ec9c7d9f1d996c2506eb7b.zip
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
-rw-r--r--test/functional/boards_controller_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/boards_controller_test.rb b/test/functional/boards_controller_test.rb
index 3d1983cd4..73ec98dae 100644
--- a/test/functional/boards_controller_test.rb
+++ b/test/functional/boards_controller_test.rb
@@ -55,6 +55,16 @@ class BoardsControllerTest < ActionController::TestCase
assert_not_nil assigns(:topics)
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
get :show, :project_id => 1, :id => 1, :format => 'atom'
assert_response :success