aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/middleware/static_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/application/middleware/static_test.rb')
-rw-r--r--railties/test/application/middleware/static_test.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/railties/test/application/middleware/static_test.rb b/railties/test/application/middleware/static_test.rb
index 1246e20d94..8a06e91297 100644
--- a/railties/test/application/middleware/static_test.rb
+++ b/railties/test/application/middleware/static_test.rb
@@ -1,5 +1,5 @@
-require 'isolation/abstract_unit'
-require 'rack/test'
+require "isolation/abstract_unit"
+require "rack/test"
module ApplicationTests
class MiddlewareStaticTest < ActiveSupport::TestCase
@@ -18,17 +18,17 @@ module ApplicationTests
# Regression test to #8907
# See https://github.com/rails/rails/commit/9cc82b77196d21a5c7021f6dca59ab9b2b158a45#commitcomment-2416514
test "doesn't set Cache-Control header when it is nil" do
- app_file "public/foo.html", 'static'
+ app_file "public/foo.html", "static"
require "#{app_path}/config/environment"
- get 'foo'
+ get "foo"
- assert_not last_response.headers.has_key?('Cache-Control'), "Cache-Control should not be set"
+ assert_not last_response.headers.has_key?("Cache-Control"), "Cache-Control should not be set"
end
test "headers for static files are configurable" do
- app_file "public/about.html", 'static'
+ app_file "public/about.html", "static"
add_to_config <<-CONFIG
config.public_file_server.headers = {
"Access-Control-Allow-Origin" => "http://rubyonrails.org",
@@ -38,10 +38,10 @@ module ApplicationTests
require "#{app_path}/config/environment"
- get '/about.html'
+ get "/about.html"
- assert_equal 'http://rubyonrails.org', last_response.headers["Access-Control-Allow-Origin"]
- assert_equal 'public, max-age=60', last_response.headers["Cache-Control"]
+ assert_equal "http://rubyonrails.org", last_response.headers["Access-Control-Allow-Origin"]
+ assert_equal "public, max-age=60", last_response.headers["Cache-Control"]
end
test "public_file_server.index_name defaults to 'index'" do
@@ -49,7 +49,7 @@ module ApplicationTests
require "#{app_path}/config/environment"
- get '/'
+ get "/"
assert_equal "/index.html\n", last_response.body
end
@@ -60,7 +60,7 @@ module ApplicationTests
require "#{app_path}/config/environment"
- get '/'
+ get "/"
assert_equal "/other-index.html\n", last_response.body
end