Is the session hash available to tests or the rails console?

My guess is that the answer is no because the session hash is
available only if you’re storing a cookie, and you can’t store a
cookie if you’re using the rails console or using the built-in testing
functionality. Can someone confirm that this is correct?

In tests:
Assuming you have this in your setup method: @request =
ActionController::TestRequest.new
You can access the session hash via
@request.session