From b89d8497f6bf911a74c350dfce6256c2a08ef59b Mon Sep 17 00:00:00 2001 From: Izaak Alpert Date: Wed, 13 Nov 2013 15:07:53 -0500 Subject: [PATCH] Updated convience method to private --- app/controllers/search_controller.rb | 2 ++ spec/controllers/search_controller_spec.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 8104f3d..35f885f 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -15,6 +15,8 @@ class SearchController < ApplicationController @total_results = @projects.count + @merge_requests.count + @issues.count + @wiki_pages.count + @blobs.total_count end + private + def find_project_ids(group_id, project_id) project_ids = current_user.authorized_projects.map(&:id) diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index 988087b..8742789 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -10,7 +10,7 @@ describe SearchController do describe '#find_project_ids' do it 'should include public projects ids when searching within a single project' do - project_ids = controller.find_project_ids(nil, project.id) + project_ids = controller.send(:find_project_ids,nil, project.id) project_ids.size.should == 1 project_ids[0].should == project.id end -- libgit2 0.21.2