2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-03 17:21:20 +08:00
discourse/spec/integration/discourse_cookie_store_spec.rb
Loïc Guitaut 5146a8e399
Revert "DEV: Debug cookie overflows" (#35120)
Reverts discourse/discourse#34639

We understood the main culprit for cookie overflows was storing
`destination_url` in the session, so we don’t really need that debug
code anymore.
2025-10-02 09:55:47 +02:00

16 lines
556 B
Ruby

# frozen_string_literal: true
describe ActionDispatch::Session::DiscourseCookieStore, type: :request do
it "only writes session cookie when changed" do
get "/session/csrf.json"
expect(response.status).to eq(200)
expect(response.cookies["_forum_session"]).to be_present
csrf_token = session[:_csrf_token]
expect(csrf_token).to be_present
get "/session/csrf.json"
expect(response.status).to eq(200)
expect(response.cookies["_forum_session"]).not_to be_present
expect(session[:_csrf_token]).to eq(csrf_token)
end
end