Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding an integration test. Fixes #4136

  • Loading branch information...
commit 4ee537a8a21ecab2a4d0c8e6a6730a72a7937428 1 parent 967490b
@tenderlove tenderlove authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 actionpack/test/controller/routing_test.rb
View
9 actionpack/test/controller/routing_test.rb
@@ -139,6 +139,15 @@ def test_lambda_constraints
assert_equal 'clients', get(URI('http://clients.example.org/'))
end
+ def test_empty_string_match
+ rs.draw do
+ get '/:username', :constraints => { :username => /[^\/]+/ },
+ :to => lambda { |e| [200, {}, ['foo']] }
+ end
+ assert_equal 'Not Found', get(URI('http://example.org/'))
+ assert_equal 'foo', get(URI('http://example.org/hello'))
+ end
+
def test_draw_with_block_arity_one_raises
assert_raise(RuntimeError) do
@rs.draw { |map| map.match '/:controller(/:action(/:id))' }
Please sign in to comment.
Something went wrong with that request. Please try again.