aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/request_id_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/request_id_test.rb')
-rw-r--r--actionpack/test/dispatch/request_id_test.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/test/dispatch/request_id_test.rb b/actionpack/test/dispatch/request_id_test.rb
index 00d8caf8f4..39d999aa82 100644
--- a/actionpack/test/dispatch/request_id_test.rb
+++ b/actionpack/test/dispatch/request_id_test.rb
@@ -1,16 +1,16 @@
-require 'abstract_unit'
+require "abstract_unit"
class RequestIdTest < ActiveSupport::TestCase
test "passing on the request id from the outside" do
- assert_equal "external-uu-rid", stub_request('HTTP_X_REQUEST_ID' => 'external-uu-rid').request_id
+ assert_equal "external-uu-rid", stub_request("HTTP_X_REQUEST_ID" => "external-uu-rid").request_id
end
test "ensure that only alphanumeric uurids are accepted" do
- assert_equal "X-Hacked-HeaderStuff", stub_request('HTTP_X_REQUEST_ID' => '; X-Hacked-Header: Stuff').request_id
+ assert_equal "X-Hacked-HeaderStuff", stub_request("HTTP_X_REQUEST_ID" => "; X-Hacked-Header: Stuff").request_id
end
test "ensure that 255 char limit on the request id is being enforced" do
- assert_equal "X" * 255, stub_request('HTTP_X_REQUEST_ID' => 'X' * 500).request_id
+ assert_equal "X" * 255, stub_request("HTTP_X_REQUEST_ID" => "X" * 500).request_id
end
test "generating a request id when none is supplied" do
@@ -18,7 +18,7 @@ class RequestIdTest < ActiveSupport::TestCase
end
test "uuid alias" do
- assert_equal "external-uu-rid", stub_request('HTTP_X_REQUEST_ID' => 'external-uu-rid').uuid
+ assert_equal "external-uu-rid", stub_request("HTTP_X_REQUEST_ID" => "external-uu-rid").uuid
end
private
@@ -38,14 +38,14 @@ class RequestIdResponseTest < ActionDispatch::IntegrationTest
test "request id is passed all the way to the response" do
with_test_route_set do
- get '/'
+ get "/"
assert_match(/\w+/, @response.headers["X-Request-Id"])
end
end
test "request id given on request is passed all the way to the response" do
with_test_route_set do
- get '/', headers: { 'HTTP_X_REQUEST_ID' => 'X' * 500 }
+ get "/", headers: { "HTTP_X_REQUEST_ID" => "X" * 500 }
assert_equal "X" * 255, @response.headers["X-Request-Id"]
end
end
@@ -56,7 +56,7 @@ class RequestIdResponseTest < ActionDispatch::IntegrationTest
def with_test_route_set
with_routing do |set|
set.draw do
- get '/', :to => ::RequestIdResponseTest::TestController.action(:index)
+ get "/", :to => ::RequestIdResponseTest::TestController.action(:index)
end
@app = self.class.build_app(set) do |middleware|