Add specs for the new StaticAssetsHandler

This commit is contained in:
syeopite
2025-06-03 16:35:40 -07:00
committed by Émilien (perso)
parent 6fd1cb3585
commit 9e482b4807
3 changed files with 213 additions and 0 deletions

View File

@@ -107,5 +107,12 @@ module Invidious::HttpServer
# Paste in the body of inherited serve_file_range
{{@type.superclass.methods.select(&.name.==("serve_file_range"))[0].body}}
end
# Clear cached files.
#
# This is only used in the specs to clear the cache before each handler test
def self.clear_cache
return @@cached_files.clear
end
end
end