summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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