Files
openfoodnetwork/spec/requests/large_request_spec.rb
Maikel Linke dcb6f4676d Remove all unnecessary spec_helper require statements
The `.rspec` file is doing this for us.
2026-01-21 12:35:34 +11:00

13 lines
450 B
Ruby

# frozen_string_literal: true
# Large requests can fail if Devise tries to store the URL in the session cookie.
#
# http://daniel.fone.net.nz/blog/2014/11/28/actiondispatch-cookies-cookieoverflow-via-devise-s-user_return_to/
RSpec.describe 'A very large request' do
it 'should not overflow cookies' do
get '/admin', params: { foo: 'x' * ActionDispatch::Cookies::MAX_COOKIE_SIZE }
expect(response).to have_http_status(:redirect)
end
end