Skip to content

Commit

Permalink
Make specs compatible with newer rack
Browse files Browse the repository at this point in the history
  • Loading branch information
andrehjr committed Mar 3, 2024
1 parent d29e26a commit 9135bb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/persistence/cookie_adapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
it "puts multiple experiments in a single cookie" do
subject["foo"] = "FOO"
subject["bar"] = "BAR"
expect(context.response.headers["Set-Cookie"]).to match(/\Asplit=%7B%22foo%22%3A%22FOO%22%2C%22bar%22%3A%22BAR%22%7D; path=\/; expires=[a-zA-Z]{3}, \d{2} [a-zA-Z]{3} \d{4} \d{2}:\d{2}:\d{2} [A-Z]{3}\Z/)
expect(Array(context.response.headers["Set-Cookie"])).to include(/\Asplit=%7B%22foo%22%3A%22FOO%22%2C%22bar%22%3A%22BAR%22%7D; path=\/; expires=[a-zA-Z]{3}, \d{2} [a-zA-Z]{3} \d{4} \d{2}:\d{2}:\d{2} [A-Z]{3}\Z/)
end

it "ensure other added cookies are not overriden" do
context.response.set_cookie "dummy", "wow"
subject["foo"] = "FOO"
expect(context.response.headers["Set-Cookie"]).to include("dummy=wow")
expect(context.response.headers["Set-Cookie"]).to include("split=")
expect(Array(context.response.headers["Set-Cookie"])).to include(/dummy=wow/)
expect(Array(context.response.headers["Set-Cookie"])).to include(/split=/)
end
end

Expand Down

0 comments on commit 9135bb6

Please sign in to comment.