| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
constraints have access
|
|
|
|
|
|
| |
Issue: when `assert_redirected_to` fails due to the response redirect not
matching the expected redirect the user-supplied message (second parameter)
is not shown. This message is only shown if the response is not a redirect.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
ActionDispatch::Integration::ResquestHelpers.
The behavior has removed at 4a6f4b92ad2f48dc7906d223fe4708d36624bd50 to
increase the compatibility with Rack::Test
Closes #7136
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Strip null bytes from Location header
|
|
|
|
| |
its own.
|
|
|
|
| |
This reverts commit 0e4748cd415660eb91e63d50aa15cdd027c612dd.
|
|
|
|
| |
converting the Mail::Body to a string to prevent errors.
|
| |
|
|
|
|
| |
called in assert_response already. changed names of local variables in order to recognize the semantics a bit easier.
|
| |
|
|
|
|
|
|
| |
This allows test classes that are not subclasses of
ActiveSupport::TestCase (like those in rspec-rails) to interact with
with this variable without having to reference ActiveSupport::TestCase.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit restores the ability to assign cookies for testing via
@request.env['HTTP_COOKIE'] and @request.cookies, e.g:
@request.env['HTTP_COOKIE'] = 'user_name=david'
get :index
assert_equal 'david', cookies[:user_name]
and
@request.cookies[:user_name] = 'david'
get :index
assert_equal 'david', cookies[:user_name]
Assigning via cookies[] is the preferred method and will take precedence
over the other two methods. This is so that cookies set in controller
actions have precedence and are carried over between calls to get, post, etc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assigning cookies for test cases should now use cookies[], e.g:
cookies[:email] = 'user@example.com'
get :index
assert_equal 'user@example.com', cookies[:email]
To clear the cookies, use clear, e.g:
cookies.clear
get :index
assert_nil cookies[:email]
We now no longer write out HTTP_COOKIE and the cookie jar is
persistent between requests so if you need to manipulate the environment
for your test you need to do it before the cookie jar is created.
|
| |
|
|\
| |
| |
| |
| |
| | |
Conflicts:
actionmailer/lib/action_mailer/base.rb
activesupport/lib/active_support/core_ext/kernel/requires.rb
|
| | |
|
|/
|
| |
Also, no need to include dependencies in AS::Concerns inside included blocks.
|
|\
| |
| | |
Performance tests improved
|
| |\
| | |
| | |
| | |
| | | |
Conflicts:
activesupport/lib/active_support/testing/performance.rb
|
| |\ \ |
|
| |\ \ \ |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
AS/testing/performance, where it is actually required
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
actionpack/lib/action_view/helpers/date_helper.rb
railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
|
| | |_|_|/
| |/| | | |
|
|/ / / / |
|
| | | | |
|
| |_|/
|/| |
| | |
| | | |
show you the failure message you provide -- instead you just always get a "Expected block to return true"
|
| | |
| | |
| | |
| | |
| | |
| | | |
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.
It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
|
| | |
| | |
| | |
| | | |
RJS in it
|
| | | |
|
| | |
| | |
| | |
| | | |
suggestion!
|
| | |
| | |
| | |
| | | |
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
|
| | | |
|
|\ \ \
| |_|/
|/| | |
|
| |/ |
|
|/
|
|
| |
failure message
|
|
|
|
|
|
|
|
|
| |
- cookies can be set using string or symbol keys
- cookies are preserved across calls to get, post, etc.
- cookie names and values are escaped
- cookies can be cleared using @request.cookies.clear
[#6272 state:resolved]
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
since Runner uses method_missing to delegate to the integration session it also should define respond_to? accordingly
|