@@ -44,13 +44,8 class ProjectsController < ApplicationController | |||||
44 | include RepositoriesHelper |
|
44 | include RepositoriesHelper | |
45 | include ProjectsHelper |
|
45 | include ProjectsHelper | |
46 |
|
46 | |||
47 | def index |
|
|||
48 | list |
|
|||
49 | render :action => 'list' unless request.xhr? |
|
|||
50 | end |
|
|||
51 |
|
||||
52 | # Lists visible projects |
|
47 | # Lists visible projects | |
53 |
def |
|
48 | def index | |
54 | projects = Project.find :all, |
|
49 | projects = Project.find :all, | |
55 | :conditions => Project.visible_by(User.current), |
|
50 | :conditions => Project.visible_by(User.current), | |
56 | :include => :parent |
|
51 | :include => :parent |
1 | NO CONTENT: file renamed from app/views/projects/list.rhtml to app/views/projects/index.rhtml |
|
NO CONTENT: file renamed from app/views/projects/list.rhtml to app/views/projects/index.rhtml |
@@ -35,13 +35,7 class ProjectsControllerTest < Test::Unit::TestCase | |||||
35 | def test_index |
|
35 | def test_index | |
36 | get :index |
|
36 | get :index | |
37 | assert_response :success |
|
37 | assert_response :success | |
38 |
assert_template ' |
|
38 | assert_template 'index' | |
39 | end |
|
|||
40 |
|
||||
41 | def test_list |
|
|||
42 | get :list |
|
|||
43 | assert_response :success |
|
|||
44 | assert_template 'list' |
|
|||
45 | assert_not_nil assigns(:project_tree) |
|
39 | assert_not_nil assigns(:project_tree) | |
46 | # Root project as hash key |
|
40 | # Root project as hash key | |
47 | assert assigns(:project_tree).has_key?(Project.find(1)) |
|
41 | assert assigns(:project_tree).has_key?(Project.find(1)) |
General Comments 0
You need to be logged in to leave comments.
Login now