Merged r2119 to r2127 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2133 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-14 15:32:11 +00:00
parent 633e026e44
commit 0a709660d2
21 changed files with 208 additions and 96 deletions
@@ -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