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