Makes the project list multi-level.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2255 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-10 18:06:14 +00:00
parent c0e6711826
commit 24441b12e1
4 changed files with 18 additions and 12 deletions

View File

@@ -38,11 +38,18 @@ class ProjectsControllerTest < Test::Unit::TestCase
get :index
assert_response :success
assert_template 'index'
assert_not_nil assigns(:project_tree)
# Root project as hash key
assert assigns(:project_tree).keys.include?(Project.find(1))
# Subproject in corresponding value
assert assigns(:project_tree)[Project.find(1)].include?(Project.find(3))
assert_not_nil assigns(:projects)
assert_tag :ul, :child => {:tag => 'li',
:descendant => {:tag => 'a', :content => 'eCookbook'},
:child => { :tag => 'ul',
:descendant => { :tag => 'a',
:content => 'Child of private child'
}
}
}
assert_no_tag :a, :content => /Private child of eCookbook/
end
def test_index_atom