Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIzaak Alpert <ialpert@blackberry.com>2013-10-24 00:27:40 +0400
committerIzaak Alpert <ialpert@gmail.com>2013-11-13 23:56:35 +0400
commit91c7b266cdffbd82ac70f35ca9bd5d08b989dbe3 (patch)
tree29b357f149b8bf7bb0f4ac88460fb80c5eaa620e /spec/controllers/search_controller_spec.rb
parentc946defb3d9ff2ad87a410f2e25999465c4b9065 (diff)
Allow public repo searching
GITLAB-1386 Change-Id: I9a0bbe8db1a9bb00cef33b3e1854d78844b70a45
Diffstat (limited to 'spec/controllers/search_controller_spec.rb')
-rw-r--r--spec/controllers/search_controller_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb
new file mode 100644
index 00000000000..988087bfa6b
--- /dev/null
+++ b/spec/controllers/search_controller_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+
+describe SearchController do
+ let(:project) { create(:project, public: true) }
+ let(:user) { create(:user) }
+
+ before do
+ sign_in(user)
+ end
+
+ 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.size.should == 1
+ project_ids[0].should == project.id
+ end
+ end
+end