Skip to content

Commit

Permalink
Merge pull request #722 from splitrb/update-specs-newer-rack
Browse files Browse the repository at this point in the history
Make specs compatible with newer rack
  • Loading branch information
andrehjr authored Mar 3, 2024
2 parents d29e26a + 9135bb6 commit e8120d1
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 e8120d1

Please sign in to comment.