summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIzaak Alpert <ialpert@gmail.com>2013-11-13 15:07:53 -0500
committerIzaak Alpert <ialpert@gmail.com>2013-11-13 15:07:53 -0500
commitb89d8497f6bf911a74c350dfce6256c2a08ef59b (patch)
tree6c86e8927d83dc0cf9d1fd2e5a5372251f51aa30
parent91c7b266cdffbd82ac70f35ca9bd5d08b989dbe3 (diff)
downloadgitlab-ce-b89d8497f6bf911a74c350dfce6256c2a08ef59b.tar.gz
Updated convience method to private
-rw-r--r--app/controllers/search_controller.rb2
-rw-r--r--spec/controllers/search_controller_spec.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 8104f3d077c..35f885fbacf 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 988087bfa6b..8742789a3b1 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