| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, assert_recognizes, assert_generates, and
assert_routing raised ActionController::RoutingError when they failed to
recognize the route.
This commit changes them to raise Assertion instead. This aligns with
convention for logical failures, and supports reporting tools that care
about the difference between logical failures and errors e.g. the
summary at the end of a test run.
- Fixes #5899
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|\
| |
| | |
Updated/changed unneeded tr/gsubs
|
| | |
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| | |
# File lib/rack/response.rb, line 114
114: def successful?; @status >= 200 && @status < 300; end
|
| | |
|
|/ |
|
|
|
|
| |
add tests for stripping \r\n chars since that's already happening
|
|\
| |
| |
| |
| | |
mattfawcett/2781-fix-querystring-route-constraint-for-testing
Fix for #2781
|
| |
| |
| |
| | |
constraints on the querystring. Issue #2781
|
|/
|
|
|
|
| |
There was a mix, sometimes patch first, sometimes put first.
Use always patch first, since this is going to be the
primary verb for updates.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
willbryant/assigns_should_not_stringify_values_master
assigns(:foo) should not convert @foo's keys to strings if it happens to be a hash
|
| |
| |
| |
| | |
a hash
|
|/ |
|
|
|
|
|
|
| |
$ curl -s http://www.ietf.org/rfc/rfc4287 | grep -io ATOM | sort | uniq -c
582 atom
175 Atom
|
|
|
|
|
|
| |
This documentation came from the assert_select plugin, but the
assert_select_feed method was omitted when the plugin was merged
into Rails in 3142502964f94d6144312ae2c368b4c4589fa25a.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
set AD::IntegrationTest.app in railtie initializer
|
|
|
|
| |
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.
|