mirror of
https://github.com/neocities/neocities.git
synced 2025-07-21 01:56:03 +02:00
Fix for cache purging for subdir default indexes
This commit is contained in:
parent
46b402a633
commit
0428a1246e
3 changed files with 15 additions and 6 deletions
|
@ -217,6 +217,14 @@ describe 'site_files' do
|
|||
@site.reload.title.must_equal title
|
||||
end
|
||||
|
||||
it 'purges cache for /subdir/' do # (not /subdir which is just a redirect to /subdir/)
|
||||
upload(
|
||||
'dir' => 'subdir',
|
||||
'files[]' => Rack::Test::UploadedFile.new('./tests/files/index.html', 'text/html')
|
||||
)
|
||||
PurgeCacheOrderWorker.jobs.select {|j| j['args'].last == '/subdir/'}.length.must_equal 1
|
||||
end
|
||||
|
||||
it 'succeeds with valid file' do
|
||||
initial_space_used = @site.space_used
|
||||
uploaded_file = Rack::Test::UploadedFile.new('./tests/files/test.jpg', 'image/jpeg')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue