Moved ProjectsController#list to ProjectsController#index.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1464 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
aa87a73e41
commit
744d866926
|
@ -44,13 +44,8 @@ class ProjectsController < ApplicationController
|
||||||
include RepositoriesHelper
|
include RepositoriesHelper
|
||||||
include ProjectsHelper
|
include ProjectsHelper
|
||||||
|
|
||||||
def index
|
|
||||||
list
|
|
||||||
render :action => 'list' unless request.xhr?
|
|
||||||
end
|
|
||||||
|
|
||||||
# Lists visible projects
|
# Lists visible projects
|
||||||
def list
|
def index
|
||||||
projects = Project.find :all,
|
projects = Project.find :all,
|
||||||
:conditions => Project.visible_by(User.current),
|
:conditions => Project.visible_by(User.current),
|
||||||
:include => :parent
|
:include => :parent
|
||||||
|
|
|
@ -35,13 +35,7 @@ class ProjectsControllerTest < Test::Unit::TestCase
|
||||||
def test_index
|
def test_index
|
||||||
get :index
|
get :index
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template 'list'
|
assert_template 'index'
|
||||||
end
|
|
||||||
|
|
||||||
def test_list
|
|
||||||
get :list
|
|
||||||
assert_response :success
|
|
||||||
assert_template 'list'
|
|
||||||
assert_not_nil assigns(:project_tree)
|
assert_not_nil assigns(:project_tree)
|
||||||
# Root project as hash key
|
# Root project as hash key
|
||||||
assert assigns(:project_tree).has_key?(Project.find(1))
|
assert assigns(:project_tree).has_key?(Project.find(1))
|
||||||
|
|
Loading…
Reference in New Issue