| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
'head :ok'
|
|
|
|
|
|
|
|
|
|
| |
`assert_redirected_to` would fail if there is no controller set on
a `ActionDispatch::IntegrationTest`, as _compute_redirect_to_location
would be called on the controller to build the url.
This regression was introduced after 1dacfbabf3bb1e0a9057dd2a016b1804e7fa38c0.
[fixes #14691]
|
|
|
|
|
|
|
|
|
|
| |
When generating an unnamed url (i.e. using `url_for` with an options
hash) we should skip anything other than standard Rails routes otherwise
it will match the first mounted application or redirect and generate a
url with query parameters rather than raising an error if the options
hash doesn't match any defined routes.
Fixes #8018
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ad46884af567d6f8d6d8d777f372c39e81a560ba.
Conflicts:
actionpack/CHANGELOG.md
actionpack/lib/action_dispatch/testing/integration.rb
actionpack/test/controller/integration_test.rb
Reason: It will conflict with a lot of test cases. Better to call
`process` directly since this is a very uncommon HTTP method.
Fixes #10638.
|
|
|
|
| |
Closes #6513.
|
| |
|
| |
|
|
|
|
|
|
| |
This is another step in moving Action View's dependencies in Action Pack
to Action View itself. Also, HtmlScanner seems to be better suited for
views rather than controllers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In integration tests, you might want to use helpers from engines that
you mounted in your application. It's not hard to add it by yourself,
but it's unneeded boilerplate. mounted_helpers are now included by
default. That means that given engine mounted like:
mount Foo::Engine => "/foo", :as => "foo"
you will be able to use paths from this engine in tests this way:
foo.root_path #=> "/foo"
(closes #6573)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit improves the handling of default_url_options in integration
tests by making behave closer to how a real application operates.
Specifically the following issues have been addressed:
* Options specified in routes.rb are used (fixes #546)
* Options specified in controllers are used
* Request parameters are recalled correctly
* Tests can override default_url_options directly
|
|
|
|
| |
renders 406 :not_acceptable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the current router DSL, using the +match+ DSL
method will match all verbs for the path to the
specified endpoint.
In the vast majority of cases, people are
currently using +match+ when they actually mean
+get+. This introduces security implications.
This commit disallows calling +match+ without
an HTTP verb constraint by default. To explicitly
match all verbs, this commit also adds a
:via => :all option to +match+.
Closes #5964
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PATCH is the correct HTML verb to map to the #update action. The
semantics for PATCH allows for partial updates, whereas PUT requires a
complete replacement.
Changes:
* adds config.default_method_for_update you can set to :patch
* optionally use PATCH instead of PUT in resource routes and forms
* adds the #patch verb to routes to detect PATCH requests
* adds #patch? to Request
* changes documentation and comments to indicate support for PATCH
This change maintains complete backwards compatibility by keeping :put
as the default for config.default_method_for_update.
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 0e4748cd415660eb91e63d50aa15cdd027c612dd.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This removes all deprecated classes in ActionController related to
Routing, Abstract Request/Response and Integration/IntegrationTest.
All tests and docs were changed to ActionDispatch instead of ActionController.
|
| |
|
|
|
|
|
|
| |
[#4628 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
ActionDispatch::Request rather than Rack::Request.
* Changed ActionDispatch::Request#method to return a String, to be
compatible with the Rack::Request superclass.
* Changed ActionDispatch::Request#method to return the original
method in the case of methodoverride and #request_method not to,
to be compatible with Rack::Request
|
| |
|
|
|
|
|
| |
At this point, its entire purpose in the open_session {} case was to
delegate back to the IntegrationTest anyway.
|
| |
|
|
|
|
| |
* Refactored ActionPatch to use fullpath instead
|
| |
|
|
|
|
| |
#routes, automatically extend the URL helpers from the RouteSet onto it
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fixes RSpec integration example groups, which mixes its Matchers
module into ActiveSupport::TestCase.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
|
|
|
| |
with_routing. This only affects our internal AP tests.
|
|
|
|
| |
open_session
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
HTTP Headers.
Before : get '/path', {}, 'Accept' => 'text/javascript'
After : get '/path', {}, 'HTTP_ACCEPT' => 'text/javascript'
|
|
|
|
| |
response objects
|
| |
|
|
|
|
| |
Eventually commit ActionDispatch::Test::MockRequest and ActionDispatch::Test:: UploadedFile upstream.
|