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

Support multi-value headers in expect_header, expect_header_contains #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rfletcher
Copy link

Some response headers, like Set-Cookie, can be specified multiple times. That results in an array of values. Calling expect_header or expect_header_contains against one of these headers causes an exception:

Failure/Error: expect_header_contains(:set_cookie, 'foo')
NoMethodError:
  undefined method `downcase' for #<Array:0x007f9d811b64c8>

This patch adds support for headers with multiple values, checking the expectation against each value in the list and passing if any one value passes.

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.

None yet

1 participant