aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/mount_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Define word boundary for unanchored path regexpPetri Avikainen2019-02-051-0/+6
|
* Use frozen string literal in actionpack/Kir Shatrov2017-07-291-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* modernizes hash syntax in actionpackXavier Noria2016-08-061-6/+6
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* make the routes reader privateAaron Patterson2015-08-181-1/+1
| | | | | nobody should be touching the routes hash without going through the NamedRouteCollection object.
* Consistent usage of spaces in hashes across our codebaseRafael Mendonça França2015-01-291-1/+1
|
* Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-291-1/+1
| | | | | | | | Non-kwargs requests are deprecated now. Guides are updated as well. `post url, nil, nil, { a: 'b' }` doesn't make sense. `post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
* Rails-ish apps should descend from Rails::RailtieAaron Patterson2014-07-161-4/+10
| | | | | Use an is_a check to ensure it's a Railsish app so we can avoid respond_to calls everywhere.
* always test against a routed rack app so there are always url_helpersAaron Patterson2014-07-071-1/+2
|
* Fix request's path_info when a rack app mounted at '/'.Larry Lv2014-06-141-0/+7
| | | | Fixes issue #15511.
* Revert "Don't remove trailing slash from PATH_INFO for mounted apps"Piotr Sarnacki2014-01-161-5/+0
| | | | | | | The revert is needed because of a regression described in #13369, routes with trailing slash are no longer recognized properly. This reverts commit 50311f1391ddd8e0349d74eb57f04b7e0045a27d.
* Fix mounting engines inside a resources blockPiotr Sarnacki2013-12-101-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | When a route is mounted inside a resources block, it's automatically prefixed, so a following code: resources :users do mount Blog::Engine => '/blog' end will generate a user_blog path helper. In order to access engine helpers, we also use "mounted_helpers", a list of helpers associated with each mounted engine, so a path to blog's post can be generated using user_blog.post_path(user, post). The problem I'm fixing here is that mount used a raw :as option, without taking nestings into account. As a result, blog was added to a route set as a `user_blog`, but helper was generated for just `blog`. This commit applies the proper logic for defining a helper for a mounted engine nested in resources or resource block. (closes #8533)
* Don't remove trailing slash from PATH_INFO for mounted appsPiotr Sarnacki2013-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Previously when app was mounted as following: class Foo def call(env) [200, {}, [env['PATH_INFO']]] end end RackMountRailsBug::Application.routes.draw do mount RackTest.new => "/foo" end trailing slash was removed from PATH_INFO. For example requesting GET /foo/bar/ on routes defined above would result in a response containing "/foo/bar" instead of "/foo/bar/". This commit fixes the issue. (closes #3215)
* Update tests for #9704, named route collisionsJeremy Kemper2013-03-241-1/+1
| | | | | * Fix named route collision in mount test fixture * Update controller named route precedence test
* Make sure :via works with mountPratik Naik2012-08-201-0/+9
|
* Add passing tests for generating URLs with nested SCRIPT_NAMEsJeremy Kemper2012-05-071-0/+5
|
* adding tests for #4029Aaron Patterson2011-12-191-1/+1
|
* Check if the routes object really responds to define_mount_prefix.José Valim2010-12-091-0/+18
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* Make all AP tests pass for Ruby 1.9.1.José Valim2010-03-121-4/+4
|
* Add support for mount RackApp, :at => "/sprockets" with a shorthand of mount ↵Carlhuda2010-03-081-0/+36
Sprockets => "/sprockets". This is different from the match syntax in that it cannot be used for controller/action and it does not assume an anchor at the end of the match. For instance, in the above example, if the client asked for "/sprockets/foo.js", the Sprockets app would have a SCRIPT_NAME of "/sprockets" and PATH_INFO of "/foo.js".