Revert "FIX: public_file_server.enabled is false in test (#8192)" (#8196)

Revert “FIX: public_file_server.enabled is false in test (#8192)” (#8196)

This reverts commit 5a8fdd02fe209872b2e2452b9b83e227dfed1727.

diff --git a/config/environments/test.rb b/config/environments/test.rb
index 4ff6594e90..da7b6f2ef3 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -10,7 +10,7 @@ Discourse::Application.configure do
   config.cache_classes = true
 
   # Configure static asset server for tests with Cache-Control for performance
-  config.public_file_server.enabled = false
+  config.public_file_server.enabled = true
 
   # don't consider reqs local so we can properly handle exceptions like we do in prd
   config.consider_all_requests_local       = false
diff --git a/spec/requests/uploads_controller_spec.rb b/spec/requests/uploads_controller_spec.rb
index 0d3231568c..cb738c73ea 100644
--- a/spec/requests/uploads_controller_spec.rb
+++ b/spec/requests/uploads_controller_spec.rb
@@ -266,6 +266,7 @@ describe UploadsController do
     end
 
     it 'returns 200 when js file' do
+      ActionDispatch::FileHandler.any_instance.stubs(:match?).returns(false)
       upload = upload_file("test.js", "themes")
       get upload.url
       expect(response.status).to eq(200)

GitHub sha: 0bf55fe2