summaryrefslogtreecommitdiff
path: root/spec/models/project_spec.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-06-29 23:35:00 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-06-29 23:35:00 -0400
commit4a8a69837a9a14fca39bf089099b581602d983f2 (patch)
tree79c028de4c65c580a4f5d462a3ac4202dbcd0e72 /spec/models/project_spec.rb
parent20b9bb2029972c5f5334d6d684e0d60edb034c5f (diff)
downloadgitlab-ce-4a8a69837a9a14fca39bf089099b581602d983f2.tar.gz
Add Application Setting to configure default Repository Path for new projectsshards-config
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index ee1142fa3aa..42308035d8c 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -607,6 +607,21 @@ describe Project, models: true do
end
end
+ context 'repository storage by default' do
+ let(:project) { create(:empty_project) }
+
+ subject { project.repository_storage }
+
+ before do
+ storages = { 'alternative_storage' => '/some/path' }
+ allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
+ stub_application_setting(repository_storage: 'alternative_storage')
+ allow_any_instance_of(Project).to receive(:ensure_dir_exist).and_return(true)
+ end
+
+ it { is_expected.to eq('alternative_storage') }
+ end
+
context 'shared runners by default' do
let(:project) { create(:empty_project) }