This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/spec/controllers/stylesheets_controller_spec.rb

26 lines
577 B
Ruby

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