Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Bug when visiting a page with params that contains square brackets #558

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions spec/integration/session_spec.rb
Expand Up @@ -52,6 +52,30 @@ module TestSessions
end
end

context "visiting with params with a square bracket" do
before(:all) do
@app = lambda do |env|
body = <<-HTML
<html><body>
Hello
</body></html>
HTML
[200,
{ 'Content-Type' => 'text/html; charset=UTF-8', 'Content-Length' => body.length.to_s },
[body]]
end
end

before do
subject.visit "/test[with_brackets]=true"
#subject.visit "/testwith_nobrackets=true" # Toggle this line to see it pass.
end

it "visits the page", wip: true do
subject.should have_content('Hello')
end
end

context "simple app" do
before(:all) do
@app = lambda do |env|
Expand Down