summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-11-05 12:38:00 +0200
committerValery Sizov <valery@gitlab.com>2015-11-05 13:18:51 +0200
commit6051c28fc03b4d9928ee2f2855f210845f9c0579 (patch)
tree43447b26e57d81765f983ef38e34eb5b3ba10997 /spec/finders
parent363900a3e7902cbda8f62b55eb2c30881b3dae3f (diff)
downloadgitlab-ce-6051c28fc03b4d9928ee2f2855f210845f9c0579.tar.gz
Allow groups to appear in the search results if the group owner allows it
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/group_finder_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/finders/group_finder_spec.rb b/spec/finders/group_finder_spec.rb
new file mode 100644
index 00000000000..78dc027837c
--- /dev/null
+++ b/spec/finders/group_finder_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe GroupsFinder do
+ let(:user) { create :user }
+ let!(:group) { create :group }
+ let!(:public_group) { create :group, public: true }
+
+ describe :execute do
+ it 'finds public group' do
+ groups = GroupsFinder.new.execute(user)
+ expect(groups.size).to eq(1)
+ expect(groups.first).to eq(public_group)
+ end
+ end
+end