mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
Dashboard calculations are done with an async job now
This commit is contained in:
@ -3,9 +3,7 @@ require_dependency 'discourse_version_check'
|
||||
|
||||
describe Admin::DashboardController do
|
||||
before do
|
||||
#NOTE: Rails.cache should be blanked between tests, at the moment we can share state with it
|
||||
# that is seriously bust on quite a few levels
|
||||
Rails.cache.delete("admin-dashboard-data-#{Discourse::VERSION::STRING}")
|
||||
AdminDashboardData.stubs(:fetch_cached_stats).returns({reports:[]})
|
||||
Jobs::VersionCheck.any_instance.stubs(:execute).returns(true)
|
||||
end
|
||||
|
||||
@ -45,13 +43,6 @@ describe Admin::DashboardController do
|
||||
json['version_check'].should_not be_present
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns report data' do
|
||||
xhr :get, :index
|
||||
json = JSON.parse(response.body)
|
||||
json.should have_key('reports')
|
||||
json['reports'].should be_a(Array)
|
||||
end
|
||||
end
|
||||
|
||||
context '.problems' do
|
||||
|
Reference in New Issue
Block a user