Skip to content

Commit

Permalink
Update remember_token_cookies
Browse files Browse the repository at this point in the history
How rack's set_cookie_header methods might return Set-Cookie or
set-cookie as a key depending on the version of rack
  • Loading branch information
sej3506 committed Dec 8, 2023
1 parent 8203ad1 commit 2c21d62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/support/request_with_remember_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def request_without_remember_token
end

def remember_token_cookies
cookie_lines = headers["Set-Cookie"].lines.map(&:chomp)
cookies = headers["Set-Cookie"] || headers["set-cookie"]
cookie_lines = cookies.lines.map(&:chomp)
cookie_lines.select { |name| name =~ /^remember_token/ }
end
end
Expand Down

0 comments on commit 2c21d62

Please sign in to comment.