diff options
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 9e5b06b745a..5e63f14b720 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -4102,6 +4102,29 @@ describe Project do end end + describe '#object_pool_params' do + let(:project) { create(:project, :repository, :public) } + + subject { project.object_pool_params } + + before do + stub_application_setting(hashed_storage_enabled: true) + end + + context 'when the objects cannot be pooled' do + let(:project) { create(:project, :repository, :private) } + + it { is_expected.to be_empty } + end + + context 'when a pool is created' do + it 'returns that pool repository' do + expect(subject).not_to be_empty + expect(subject[:pool_repository]).to be_persisted + end + end + end + describe '#git_objects_poolable?' do subject { project } |