mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Version checks: tolerate old version check data that can happen immediately after upgrading but forgetting to restart sidekiq/clockwork. Don't cache version check data along with other dashboard data.
This commit is contained in:
@@ -81,4 +81,28 @@ describe DiscourseUpdates do
|
||||
end
|
||||
end
|
||||
|
||||
context 'old version check data' do
|
||||
context 'installed is latest' do
|
||||
before { stub_data(Discourse::VERSION::STRING, 1, false, 8.hours.ago) }
|
||||
|
||||
it 'queues a version check' do
|
||||
Jobs.expects(:enqueue).with(:version_check, anything)
|
||||
subject
|
||||
end
|
||||
|
||||
it 'reports 0 missing versions' do
|
||||
subject['missing_versions_count'].should == 0
|
||||
end
|
||||
end
|
||||
|
||||
context 'installed is not latest' do
|
||||
before { stub_data('0.9.1', 0, false, 8.hours.ago) }
|
||||
|
||||
it 'queues a version check' do
|
||||
Jobs.expects(:enqueue).with(:version_check, anything)
|
||||
subject
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user