2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/spec/controllers/stylesheets_controller_spec.rb

26 lines
577 B
Ruby
Raw Normal View History

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