aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing
diff options
context:
space:
mode:
authorJorge Bejar <jorge@wyeworks.com>2015-04-21 00:16:48 -0300
committerZachary Scott <e@zzak.io>2015-04-25 23:14:28 -0700
commit8c180cdaf69f07eb0ffd502dfc6c82a0b0281c48 (patch)
tree2b0df98d050d56018a24402cdee72b5014dcd593 /actionpack/test/dispatch/routing
parent6a9d81800b04126a3f57b6595d48cee47ceeb3cf (diff)
downloadrails-8c180cdaf69f07eb0ffd502dfc6c82a0b0281c48.tar.gz
rails-8c180cdaf69f07eb0ffd502dfc6c82a0b0281c48.tar.bz2
rails-8c180cdaf69f07eb0ffd502dfc6c82a0b0281c48.zip
Fix rake routes for api apps
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test/dispatch/routing')
-rw-r--r--actionpack/test/dispatch/routing/inspector_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb
index 3df022c64b..4047214843 100644
--- a/actionpack/test/dispatch/routing/inspector_test.rb
+++ b/actionpack/test/dispatch/routing/inspector_test.rb
@@ -313,6 +313,22 @@ module ActionDispatch
assert_equal ["Prefix Verb URI Pattern Controller#Action",
" GET /:controller(/:action) (?-mix:api\\/[^\\/]+)#:action"], output
end
+
+ def test_inspect_routes_shows_resources_route_when_assets_disabled
+ @set = ActionDispatch::Routing::RouteSet.new
+ app = ActiveSupport::OrderedOptions.new
+
+ Rails.stubs(:application).returns(app)
+
+ output = draw do
+ get '/cart', to: 'cart#show'
+ end
+
+ assert_equal [
+ "Prefix Verb URI Pattern Controller#Action",
+ " cart GET /cart(.:format) cart#show"
+ ], output
+ end
end
end
end