S3 deprecation warning

This commit is contained in:
Régis Hanol
2015-03-25 18:34:07 +01:00
parent 2b46b52b64
commit 90de61ee3d
3 changed files with 23 additions and 1 deletions

View File

@ -244,4 +244,20 @@ describe AdminDashboardData do
end
end
describe 's3_deprecation_warning' do
subject { described_class.new.s3_deprecation_warning }
it 'returns nil when using local storage' do
SiteSetting.stubs(:enable_s3_uploads).returns(false)
ENV.stubs(:[]).with('RUBY_GC_MALLOC_LIMIT').returns(90000000)
expect(subject).to be_nil
end
it 'returns a string when s3 storage' do
SiteSetting.stubs(:enable_s3_uploads).returns(true)
expect(subject).to_not be_nil
end
end
end