mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 13:35:20 -05:00
fix stylesheet cache to recover if file is on disk
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe StylesheetsController do
|
||||
|
||||
it 'can survive cache miss' do
|
||||
DiscourseStylesheets.cache.clear
|
||||
DiscourseStylesheets.stylesheet_link_tag('desktop_rtl')
|
||||
|
||||
StylesheetCache.destroy_all
|
||||
|
||||
# digestless
|
||||
get :show, name: 'desktop_rtl'
|
||||
expect(response).to be_success
|
||||
|
||||
# tmp folder destruction and cached
|
||||
`rm #{DiscourseStylesheets.cache_fullpath}/*`
|
||||
|
||||
get :show, name: 'desktop_rtl'
|
||||
expect(response).to be_success
|
||||
|
||||
# there is an edge case which is ... disk and db cache is nuked, very unlikely to happen
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user