-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add remember me cookie assertions #97
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -44,6 +44,12 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest | |||||||
|
||||||||
assert_not_nil current_user | ||||||||
assert_not_nil cookies[:remember_token] | ||||||||
|
||||||||
remember_me_cookie = cookies.get_cookie("remember_token") | ||||||||
|
||||||||
assert remember_me_cookie.http_only? | ||||||||
assert remember_me_cookie.secure? | ||||||||
assert_equal "Strict", remember_me_cookie.to_h["SameSite"] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised this passed, since it doesn't look like the implementation changed? rails-authentication-from-scratch/app/controllers/concerns/authentication.rb Lines 37 to 39 in b3e253f
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't pass. I tested this in the wrong directory (long story). I'm going to fix this. |
||||||||
end | ||||||||
|
||||||||
test "should forget user when logging out" do | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this meant to be part of #96?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Ignore this mess for now.