diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-12 13:49:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-12 13:49:14 +0000 |
commit | b21b6c365cc1f058207490d924d4c804843464a8 (patch) | |
tree | 6a2dc3f6492ee672eb092a241dd9c033aae0c196 /test/functional/documents_controller_test.rb | |
parent | c6511849987c695057c395f10736b54e565461ee (diff) | |
download | redmine-b21b6c365cc1f058207490d924d4c804843464a8.tar.gz redmine-b21b6c365cc1f058207490d924d4c804843464a8.zip |
Fixed: default category ignored when adding a document (#2328).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2124 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/documents_controller_test.rb')
-rw-r--r-- | test/functional/documents_controller_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb index 7c1f0213a..b2e7abda0 100644 --- a/test/functional/documents_controller_test.rb +++ b/test/functional/documents_controller_test.rb @@ -32,10 +32,19 @@ class DocumentsControllerTest < Test::Unit::TestCase end def test_index + # Sets a default category + e = Enumeration.find_by_name('Technical documentation') + e.update_attributes(:is_default => true) + get :index, :project_id => 'ecookbook' assert_response :success assert_template 'index' assert_not_nil assigns(:grouped) + + # Default category selected in the new document form + assert_tag :select, :attributes => {:name => 'document[category_id]'}, + :child => {:tag => 'option', :attributes => {:selected => 'selected'}, + :content => 'Technical documentation'} end def test_new_with_one_attachment |