summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-30 11:35:28 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-30 17:34:14 +0200
commitba2d7eda617fadad5010a8c3cf054af795693927 (patch)
tree2f895ebcaa8ff2b3a4786096124d1e048bc0e053 /spec
parentfae9814ea3bf8ceececa37ee26367cc2ec9fdc18 (diff)
downloadgitlab-ce-ba2d7eda617fadad5010a8c3cf054af795693927.tar.gz
Improve search within group logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/models/project_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 527eb704036..48b085781e7 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1833,6 +1833,14 @@ describe Project, models: true do
end
end
+ describe 'inside_path' do
+ let!(:project1) { create(:empty_project) }
+ let!(:project2) { create(:empty_project) }
+ let!(:path) { project1.namespace.path }
+
+ it { expect(Project.inside_path(path)).to eq([project1]) }
+ end
+
def enable_lfs
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
end