Skip to content
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

Allow better testing of cookies #133

Closed

Conversation

bestie
Copy link

@bestie bestie commented Aug 10, 2015

It inconvenient to test cookies settings in depth because the current
behavior when retrieving a cookie is to return just the value. This can
be insufficient when you want to ensure that a cookie is HTTP only or
has a particular expiry time.

  • Add CookieJar#get_cookie to return full cookie object
  • Add Cookie#http_only? this value was previous somewhat hidden
  • Add Cookie#to_h which returns all options and values in a Hash

It inconvenient to test cookies settings in depth because the current
behavior when retrieving a cookie is to return just the value. This can
be insufficient when you want to ensure that a cookie is HTTP only or
has a particular expiry time.

* Add CookieJar#get_cookie to return full cookie object
* Add Cookie#http_only? this value was previous somewhat hidden
* Add Cookie#to_h which returns all options and values in a Hash
@bestie bestie force-pushed the allow-access-to-all-cookie-settings branch from 5779172 to 0a9a557 Compare August 10, 2015 13:57
@Holek
Copy link

Holek commented Aug 10, 2015

OMG 👍

@dennissivia
Copy link

+1 for me

@junaruga
Copy link
Contributor

@bestie thank you for your PR.
It is merged as a519e56 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants