Namespace
Methods
T
Constants
SessionKey = '_myapp_session'
 
SessionSecret = 'b3c631c314c0bbca50c1b2843150fe33'
 
Instance Public methods
test_flash()
# File actionpack/test/controller/flash_test.rb, line 240
def test_flash
  with_test_route_set do
    get '/set_flash'
    assert_response :success
    assert_equal "hello", @request.flash["that"]

    get '/use_flash'
    assert_response :success
    assert_equal "flash: hello", @response.body
  end
end
test_redirect()
# File actionpack/test/controller/flash_test.rb, line 252
def test_redirect
  with_test_route_set do
    get '/set_flash'
    assert_response :success
    assert_equal "hello", @request.flash["that"]

    get '/redirect_without_flash'
    assert_response :redirect
    assert_equal "hello", @request.flash["that"]

    get '/redirect_without_flash'
    assert_response :redirect
    assert_equal nil, @request.flash["that"]
  end
end
test_setting_flash_does_not_raise_in_following_requests()
# File actionpack/test/controller/flash_test.rb, line 277
def test_setting_flash_does_not_raise_in_following_requests
  with_test_route_set do
    env = { 'action_dispatch.request.flash_hash' => ActionDispatch::Flash::FlashHash.new }
    get '/set_flash', nil, env
    get '/set_flash', nil, env
  end
end
test_setting_flash_now_does_not_raise_in_following_requests()
# File actionpack/test/controller/flash_test.rb, line 285
def test_setting_flash_now_does_not_raise_in_following_requests
  with_test_route_set do
    env = { 'action_dispatch.request.flash_hash' => ActionDispatch::Flash::FlashHash.new }
    get '/set_flash_now', nil, env
    get '/set_flash_now', nil, env
  end
end