mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
add test for + behavior
This commit is contained in:
parent
b4d7d4bb10
commit
cd82a57154
1 changed files with 11 additions and 0 deletions
|
@ -359,6 +359,17 @@ class RoutingTest < Test::Unit::TestCase
|
|||
assert not_found?
|
||||
end
|
||||
|
||||
it "does not convert plus sign into space as the value of a named param" do
|
||||
mock_app do
|
||||
get '/:test' do
|
||||
params["test"]
|
||||
end
|
||||
end
|
||||
get '/bob+ross'
|
||||
assert ok?
|
||||
assert_equal 'bob+ross', body
|
||||
end
|
||||
|
||||
it "literally matches parens in paths" do
|
||||
route_def '/test(bar)/'
|
||||
|
||||
|
|
Loading…
Reference in a new issue