mirror of
https://github.com/neocities/neocities.git
synced 2025-06-15 17:04:34 +02:00
scrub question marks
This commit is contained in:
parent
4fe0443a10
commit
605fa2cc74
2 changed files with 9 additions and 0 deletions
|
@ -408,6 +408,13 @@ describe 'site_files' do
|
|||
_(File.exists?(@site.files_path('te[s]t.jpg'))).must_equal true
|
||||
end
|
||||
|
||||
it 'scrubs question marks' do
|
||||
uploaded_file = Rack::Test::UploadedFile.new('./tests/files/te[s]t.jpg', 'image/jpeg')
|
||||
upload 'te?st.jpg' => uploaded_file
|
||||
_(last_response.body).must_match /successfully uploaded/i
|
||||
_(File.exists?(@site.files_path('test.jpg'))).must_equal true
|
||||
end
|
||||
|
||||
it 'sets site changed to false if index is empty' do
|
||||
uploaded_file = Rack::Test::UploadedFile.new('./tests/files/blankindex/index.html', 'text/html')
|
||||
upload 'index.html' => uploaded_file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue