aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2014-01-20 16:34:22 +0000
committerAndrew White <andyw@pixeltrix.co.uk>2014-01-20 16:34:22 +0000
commitbf191318afb62a66fe37bd2649ecabfc4c8744a6 (patch)
tree377088ba63258dc65f77d130b5c3ebe342e2cae3 /actionpack/test/dispatch/routing
parentf9f32e04ad57c37353a756673794a41026f65a34 (diff)
downloadrails-bf191318afb62a66fe37bd2649ecabfc4c8744a6.tar.gz
rails-bf191318afb62a66fe37bd2649ecabfc4c8744a6.tar.bz2
rails-bf191318afb62a66fe37bd2649ecabfc4c8744a6.zip
Tidy up tests and CHANGELOG for #12598
Diffstat (limited to 'actionpack/test/dispatch/routing')
-rw-r--r--actionpack/test/dispatch/routing/inspector_test.rb17
-rw-r--r--actionpack/test/dispatch/routing/route_set_test.rb2
2 files changed, 14 insertions, 5 deletions
diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb
index 2746c683ba..8045464284 100644
--- a/actionpack/test/dispatch/routing/inspector_test.rb
+++ b/actionpack/test/dispatch/routing/inspector_test.rb
@@ -37,7 +37,6 @@ module ActionDispatch
end
engine.routes.draw do
get '/cart', :to => 'cart#show'
- get '/view-cart', :to => 'cart#show'
end
output = draw do
@@ -51,8 +50,7 @@ module ActionDispatch
" blog /blog Blog::Engine",
"",
"Routes for Blog::Engine:",
- " cart GET /cart(.:format) cart#show",
- "view_cart GET /view-cart(.:format) cart#show"
+ " cart GET /cart(.:format) cart#show"
], output
end
@@ -162,6 +160,19 @@ module ActionDispatch
], output
end
+ def test_rake_routes_shows_routes_with_dashes
+ output = draw do
+ get 'about-us' => 'pages#about_us'
+ get 'our-work/latest'
+ end
+
+ assert_equal [
+ " Prefix Verb URI Pattern Controller#Action",
+ " about_us GET /about-us(.:format) pages#about_us",
+ "our_work_latest GET /our-work/latest(.:format) our_work#latest"
+ ], output
+ end
+
class RackApp
def self.call(env)
end
diff --git a/actionpack/test/dispatch/routing/route_set_test.rb b/actionpack/test/dispatch/routing/route_set_test.rb
index 3831c4c585..0e488d2b88 100644
--- a/actionpack/test/dispatch/routing/route_set_test.rb
+++ b/actionpack/test/dispatch/routing/route_set_test.rb
@@ -30,12 +30,10 @@ module ActionDispatch
draw do
get 'foo', to: SimpleApp.new('foo#index')
get 'bar', to: SimpleApp.new('bar#index')
- get 'foo-bar', to: SimpleApp.new('bar#index')
end
assert_equal '/foo', url_helpers.foo_path
assert_equal '/bar', url_helpers.bar_path
- assert_equal '/foo-bar', url_helpers.foo_bar_path
end
test "url helpers are updated when route is updated" do