-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set test cookie for ActionCable? #887
Comments
Probably long since resolved, but if anyone else faces issues I think you need to query the env off of the connection object in action cable: def cookies
@cookies ||= ActionDispatch::Request.new(connection.env).cookie_jar
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I am trying to write a test for an ActionCable connection. My connection class looks like this:
I am trying to write a test along the lines recommended in the Rails docs:
However the remember token cookie doesn't seem to get set. I also tried
cookies[:remember_token] = "42"
.I'd greatly appreciate any advice for how to get this working. Thanks!
The text was updated successfully, but these errors were encountered: