Skip to content

Commit

Permalink
Remove leading dot to fix compatibility with latest cgi gem. (#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 28, 2022
1 parent 4b6def1 commit 3b5033b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/spec_mock_request.rb
Expand Up @@ -26,8 +26,8 @@
req.GET["status"] || 200,
"content-type" => "text/yaml"
)
response.set_cookie("session_test", { value: "session_test", domain: ".test.com", path: "/" })
response.set_cookie("secure_test", { value: "secure_test", domain: ".test.com", path: "/", secure: true })
response.set_cookie("session_test", { value: "session_test", domain: "test.com", path: "/" })
response.set_cookie("secure_test", { value: "secure_test", domain: "test.com", path: "/", secure: true })
response.set_cookie("persistent_test", { value: "persistent_test", max_age: 15552000, path: "/" })
response.set_cookie("persistent_with_expires_test", { value: "persistent_with_expires_test", expires: Time.httpdate("Thu, 31 Oct 2021 07:28:00 GMT"), path: "/" })
response.set_cookie("expires_and_max-age_test", { value: "expires_and_max-age_test", expires: Time.now + 15552000 * 2, max_age: 15552000, path: "/" })
Expand Down
8 changes: 4 additions & 4 deletions test/spec_mock_response.rb
Expand Up @@ -26,8 +26,8 @@
req.GET["status"] || 200,
"content-type" => "text/yaml"
)
response.set_cookie("session_test", { value: "session_test", domain: ".test.com", path: "/" })
response.set_cookie("secure_test", { value: "secure_test", domain: ".test.com", path: "/", secure: true })
response.set_cookie("session_test", { value: "session_test", domain: "test.com", path: "/" })
response.set_cookie("secure_test", { value: "secure_test", domain: "test.com", path: "/", secure: true })
response.set_cookie("persistent_test", { value: "persistent_test", max_age: 15552000, path: "/" })
response.set_cookie("persistent_with_expires_test", { value: "persistent_with_expires_test", expires: Time.httpdate("Thu, 31 Oct 2021 07:28:00 GMT"), path: "/" })
response.set_cookie("expires_and_max-age_test", { value: "expires_and_max-age_test", expires: Time.now + 15552000 * 2, max_age: 15552000, path: "/" })
Expand Down Expand Up @@ -82,7 +82,7 @@
res = Rack::MockRequest.new(app).get("")
session_cookie = res.cookie("session_test")
session_cookie.value[0].must_equal "session_test"
session_cookie.domain.must_equal ".test.com"
session_cookie.domain.must_equal "test.com"
session_cookie.path.must_equal "/"
session_cookie.secure.must_equal false
session_cookie.expires.must_be_nil
Expand Down Expand Up @@ -122,7 +122,7 @@
res = Rack::MockRequest.new(app).get("")
secure_cookie = res.cookie("secure_test")
secure_cookie.value[0].must_equal "secure_test"
secure_cookie.domain.must_equal ".test.com"
secure_cookie.domain.must_equal "test.com"
secure_cookie.path.must_equal "/"
secure_cookie.secure.must_equal true
secure_cookie.expires.must_be_nil
Expand Down

0 comments on commit 3b5033b

Please sign in to comment.