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

After a small conversation, we decided that we can set `public_file_server.enabled` to false in the `test` environment to have the same value as `production`.
This commit is contained in:
Krzysztof Kotlarek 2019-10-16 09:18:48 +11:00 committed by Sam
parent ac2cd07775
commit 5a8fdd02fe
2 changed files with 1 additions and 2 deletions

View File

@ -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 = true
config.public_file_server.enabled = false
# don't consider reqs local so we can properly handle exceptions like we do in prd
config.consider_all_requests_local = false

View File

@ -266,7 +266,6 @@ 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)