mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Dashboard warning when GC params are default
This commit is contained in:
@ -40,4 +40,18 @@ describe AdminDashboardData do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'gc_checks' do
|
||||
subject { AdminDashboardData.new.gc_checks }
|
||||
|
||||
it 'returns nil when gc params are set' do
|
||||
ENV.stubs(:[]).with('RUBY_GC_MALLOC_LIMIT').returns(90000000)
|
||||
subject.should be_nil
|
||||
end
|
||||
|
||||
it 'returns a string when gc params are not set' do
|
||||
ENV.stubs(:[]).with('RUBY_GC_MALLOC_LIMIT').returns(nil)
|
||||
subject.should_not be_nil
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user