mirror of
https://github.com/neocities/neocities.git
synced 2025-08-06 09:34:57 +02:00
cache manifest, otf fonts
This commit is contained in:
parent
0de126d6b1
commit
fe5b47ce53
4 changed files with 22 additions and 8 deletions
7
tests/files/cache.manifest
Normal file
7
tests/files/cache.manifest
Normal file
|
@ -0,0 +1,7 @@
|
|||
CACHE MANIFEST
|
||||
NETWORK:
|
||||
/test.html
|
||||
CACHE:
|
||||
/test.css
|
||||
/test.js
|
||||
/test.png
|
BIN
tests/files/chunkfive.otf
Normal file
BIN
tests/files/chunkfive.otf
Normal file
Binary file not shown.
|
@ -40,9 +40,13 @@ describe 'site_files' do
|
|||
end
|
||||
|
||||
it 'works with manifest files' do
|
||||
$debug = true
|
||||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/.manifest', 'text/plain')
|
||||
File.exists?(@site.files_path('.manifest')).must_equal true
|
||||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/cache.manifest', 'text/cache-manifest')
|
||||
File.exists?(@site.files_path('cache.manifest')).must_equal true
|
||||
end
|
||||
|
||||
it 'works with otf fonts' do
|
||||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/chunkfive.otf', 'application/vnd.ms-opentype')
|
||||
File.exists?(@site.files_path('chunkfive.otf')).must_equal true
|
||||
end
|
||||
|
||||
it 'succeeds with index.html file' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue