aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
Commit message (Collapse)AuthorAgeFilesLines
* ActionDispatch::SSL should keep original header's behaviorFumiaki MATSUSHIMA2015-06-141-0/+11
| | | | | | `ActionDispatch::SSL` changes headers to `Hash`. So some headers will be broken if there are some middlewares on ActionDispatch::SSL and if it uses `Rack::Utils::HeaderHash`.
* Routes resources avoid :new and :edit endpoints if api_only is enabledJorge Bejar2015-06-111-0/+75
|
* Remove extra whitespacesSantiago Pastorino2015-06-111-1/+1
|
* Remove Unneeded ApiPublicExceptions middleware, PublicExceptions already ↵Santiago Pastorino2015-06-111-37/+0
| | | | does the work
* Add ApiPublicException middlewareSantiago Pastorino2015-06-111-2/+39
|
* Change the `index` arg of `ActionDispatch::Static#new` to a kwargYuki Nishijima2015-06-111-1/+1
|
* Remove `assigns` and `assert_template`.Guo Xiang Tan2015-05-301-110/+0
|
* config.static_index configures directory index "index.html" filenameEliot Sykes2015-05-281-0/+14
| | | | | | Set `config.static_index` to serve a static directory index file not named `index`. For example, to serve `main.html` instead of `index.html` for directory requests, set `config.static_index` to `"main"`.
* Add assertion for get? method into test casesMehmet Emin İNAÇ2015-05-271-0/+1
|
* Prefer assert_not over refuteRafael Mendonça França2015-05-181-1/+1
|
* ActionDispatch::Journey::Routes#empty? test casesValentine Valyaeff2015-05-191-0/+14
|
* Fix rake routes for api appsJorge Bejar2015-04-251-0/+16
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Use `silence_warnings` on `StaticTests`eileencodes2015-04-141-6/+12
| | | | | | | | | | | | When 7e504927 was merged setting `Encoding.default_internal` and `Encoding.default_external` would throw a warning when the ActionPack tests were run. Example warning: `actionpack/test/dispatch/static_test.rb:12: warning: setting Encoding.default_external` This patch silences the warnings as other similar tests do for setting default_internal and default_external.
* [Rails4 regression] prevent thin and puma cause error in Non ASCII URL on ↵Toshi MARUYAMA2015-04-091-0/+22
| | | | | | | | | | | | | | | | | | | Windows * https://github.com/rails/rails/issues/19187 * https://github.com/rails/rails/pull/19533 * https://github.com/macournoyer/thin/issues/268 These are serious Rails 4 regression for Redmine Bitnami Windows users. https://community.bitnami.com/t/problems-with-3-0-1-installation-see-report-inside/30195/ It is not caused on webrick users. Related: * https://github.com/rack/rack/issues/732#issuecomment-67677272 * https://github.com/phusion/passenger/issues/1328
* sort_by instead of sortYang Bo2015-04-081-0/+13
| | | | | | it is avoid sort errot within different and mixed keys. used `sort_by` + `block` to list parameter by keys. keep minimum changes
* Define a setup method instead of using setup as blockRafael Mendonça França2015-03-271-1/+2
| | | | | setup as block run before setup actlually runs so it will fail for our case
* Provide friendlier access to request variantsGeorge Claghorn2015-03-241-19/+30
| | | | Closes #18933.
* Fix handling of empty X_FORWARDED_HOST header.adam2015-03-201-0/+3
| | | | | | Previously, an empty X_FORWARDED_HOST header would cause Actiondispatch::Http:URL.raw_host_with_port to return nil, causing Actiondispatch::Http:URL.host to raise a NoMethodError.
* Merge pull request #19309 from f1sherman/dont-set-session-options-idGuillermo Iguaran2015-03-123-4/+4
|\ | | | | Use request.session.id instead of request.session_options[:id]
| * Use request.session.id instead of request.session_options[:id]Brian John2015-03-123-4/+4
| | | | | | | | | | | | | | | | | | As of the upgrade to Rack 1.5, request.session_options[:id] is no longer populated. Reflect this change in the tests by using request.session.id instead. Related change in Rack: https://github.com/rack/rack/commit/83a270d6
* | Also skip Content-Encoding and Vary header if 304Kohei Suzuki2015-03-121-1/+2
| |
* | 304 response should not include Content-Type headerKohei Suzuki2015-03-101-0/+9
|/ | | | | Rack::Lint raises an error saying "Content-Type header found in 304 response, not allowed".
* Revert "Revert integration test refactoring that caused app test regressions"eileencodes2015-03-091-4/+0
| | | | This reverts commit 714205988315d2f98aa3e749747c44470e18676b.
* Drop request class from RouteSet constructor.Aaron Patterson2015-03-041-1/+5
| | | | | If you would like to use a custom request class, please subclass and implemet the `request_class` method.
* Merge pull request #19147 from gsamokovarov/work-around-ruby-10695Eileen M. Uchitelle2015-03-021-1/+1
|\ | | | | Work around for upstream Ruby bug #10685
| * Work around for upstream Ruby bug #10685Genadi Samokovarov2015-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In f6e293ec54f02f83cdb37502bea117f66f87bcae we avoided a segfault in the tests, however I think we should try to avoid the crash, as it may happen in user code as well. Here is what I distiled the bug down to: ```ruby # Rails case - works on 2.0, 2.1; crashes on 2.2 require 'action_dispatch' ActionDispatch::Response.new(200, "Content-Type" => "text/xml") # General case - works on 2.0, 2.1; crashes on 2.2 def foo(optional = {}, default_argument: nil) end foo('quux' => 'bar') ```
* | Avoid accurate assertions on error messagesRobin Dupret2015-03-021-2/+2
|/ | | | | Since there are disparities between the raised error messages on the different implementations, let's avoid being too accurate.
* Fix segmentation fault in ActionPack testseileencodes2015-02-281-1/+1
| | | | | | Introduced in f6e293e ActionPack tests began sefaulting. I found that it was the kwargs and the test causing the seg fault was missing the new default_headers argument.
* Revert integration test refactoring that caused app test regressionsJeremy Kemper2015-02-261-0/+4
| | | | | | | | | | | | Haven't diagnosed yet. No similarly failing tests in Rails to work from. cc @tenderlove, @eileencodes Revert "there is always an integration session, so remove the check" Revert "lazily create the integration session" Revert "use before_setup to set up test instance variables" This reverts commits 4cf3b8ac47f109fa83a6f66eb97d6cb0eace0d05, 303567e554de26822f3107be55c471d6477a745f, and fa63448420d3385dbd043aca22dba973b45b8bb2.
* Revert "Merge pull request #18764 from tsun1215/master"Jeremy Kemper2015-02-261-4/+5
| | | | | This reverts commit b6dd0c4ddebf5e7aab0a669915cb349ec65e5b88, reversing changes made to de9a3748c436f849dd1877851115cd94663c2725.
* Merge pull request #18434 from brainopia/change_filter_on_rails_info_routesRichard Schneeman2015-02-261-8/+0
|\ | | | | Change filter on /rails/info/routes to use an actual path regexp from rails
| * Change filter on /rails/info/routes to use an actual path regexp from railsbrainopia2015-02-231-8/+0
| | | | | | | | | | | | | | | | Change filter on /rails/info/routes to use an actual path regexp from rails and not approximate javascript version. Oniguruma supports much more extensive list of features than javascript regexp engine. Fixes #18402.
* | Add a failing test demonstrating regression with HEAD requests to Rack apps, ↵Jeremy Kemper2015-02-241-3/+9
|/ | | | re #18764
* Prefer request_id over uuid and test the aliasRafael Mendonça França2015-02-201-4/+8
|
* Merge pull request #18218 from brainopia/fix_match_shorthand_in_routesRafael Mendonça França2015-02-201-0/+9
|\ | | | | Don't use shorthand match on routes with inappropriate symbols
| * Improve shorthand matching for routesbrainopia2015-01-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shorthand route match is when controller and action are taken literally from path. E.g. get '/foo/bar' # => will use 'foo#bar' as endpoint get '/foo/bar/baz' # => will use 'foo/bar#baz' as endpoint Not any path with level two or more of nesting can be used as shortcut. If path contains any characters outside of /[\w-]/ then it can't be used as such. This commit ensures that invalid shortcuts aren't used. ':controller/:action/postfix' - is an example of invalid shortcut that was previosly matched and led to exception: "ArgumentError - ':controller/:action' is not a supported controller name"
* | lazily create the integration sessionAaron Patterson2015-02-121-4/+0
| | | | | | | | now we don't have to call reset! everywhere
* | Explicitly ignored wildcard verbs from head_routesTerence Sun2015-02-081-0/+12
| | | | | | | | | | | | In match_head_routes, deleted the routes in which request.request_method was empty (matches all HTTP verbs) when responding to a HEAD request. This prevents catch-all routes (such as Racks) from intercepting the HEAD request. Fixes #18698
* | Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-032-2/+0
| | | | | | | | onwards.
* | Show proper traces on Windows for the error pagesGenadi Samokovarov2015-02-011-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an issue brought up by @daniel-rikowski in rails/web-console#91. Citing his PR proposal here: > Prior to this, backtrace lines were simply split by a single colon. > > Unfortunately that is also the drive letter delimiter in Windows paths > which resulted in a lot of empty source fragments of "C:0". ("C" from > the drive letter and 0 from "/path/to/rails/file.rb:16".to_i) > > Now the trace line is split by the first colon followed by some digits, > which works for both Windows and Unix path styles. Now, the PR was sent against web-console, because of the templates copy issue we used to had. Instead of bothering the contributor to reopen the issue against upstream Rails itself, I will make sure he gets the credit by putting his name in [rails-contributors/hard_coded_authors.rb][]. [rails-contributors/hard_coded_authors.rb]: (https://github.com/fxn/rails-contributors/blob/master/app/models/names_manager/hard_coded_authors.rb).
* | Consistent usage of spaces in hashes across our codebaseRafael Mendonça França2015-01-2911-53/+53
| |
* | Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-2913-80/+81
|/ | | | | | | | 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
* Fix name_for_action in routingrono232015-01-191-0/+38
|
* No need of requiring `rbconfig`, it is by-default loadedKuldeep Aggarwal2015-01-101-1/+0
|
* Remove deprecated usage of string keys in URL helpersRafael Mendonça França2015-01-041-20/+0
|
* Remove deprecated `only_path` option on `*_path` helpersRafael Mendonça França2015-01-041-44/+0
|
* Remove deprecated support to define routes with `:to` option thatRafael Mendonça França2015-01-041-30/+4
| | | | doesn't contain `#`
* Remove deprecated `ActionDispatch::Response#to_ary`Rafael Mendonça França2015-01-041-16/+2
|
* Merge pull request #10380 from JonRowe/test_all_domain_2_letter_tldRafael Mendonça França2015-01-021-0/+7
|\ | | | | | | Assert that 2 letter tlds with 3 letter domain names work when option specified.
| * add test asserting that 2 letter tlds with 3 letter domain names work when ↵Jon Rowe2013-04-301-0/+7
| | | | | | | | option specified