mirror of
https://github.com/neocities/neocities.git
synced 2025-07-25 20:08:27 +02:00
purge cache for stripped .html files
This commit is contained in:
parent
1d448f8cac
commit
9bb34424ff
2 changed files with 14 additions and 0 deletions
|
@ -275,6 +275,14 @@ describe 'site_files' do
|
|||
_(File.exists?(@site.files_path('chunkfive.otf'))).must_equal true
|
||||
end
|
||||
|
||||
it 'purges cache for html file with extension removed' do
|
||||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/notindex.html', 'text/html')
|
||||
_(PurgeCacheWorker.jobs.first['args'].last).must_equal '/notindex.html'
|
||||
PurgeCacheWorker.jobs.clear
|
||||
PurgeCacheWorker.new.perform @site.username, '/notindex.html'
|
||||
_(PurgeCacheWorker.jobs.first['args'].last).must_equal '/notindex'
|
||||
end
|
||||
|
||||
it 'succeeds with index.html file' do
|
||||
_(@site.site_changed).must_equal false
|
||||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/index.html', 'text/html')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue