Updated convience method to private

This commit is contained in:
Izaak Alpert 2013-11-13 15:07:53 -05:00
parent 91c7b266cd
commit b89d8497f6
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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