aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18721 from sj26/pre-discard-flashAaron Patterson2015-02-011-0/+2
|\ | | | | Pre-discard flash messages
| * Fix flash remaining after last flash deletedSamuel Cochran2015-01-291-0/+2
| | | | | | | | | | | | | | Inside a controller functional test after the last flash is deleted it still persists the flash because to_session_value is nil. We should delete it from the session when the serialized version is nil, same as the flash middleware.
* | Fix a typo in deprecation warning. #process takes method instead of http_method.Juanito Fatas2015-01-311-1/+1
| |
* | [ci skip] Document format parameter of process method in AC test_case.Juanito Fatas2015-01-311-0/+1
| |
* | Use fixed fonts only in the name of the parameterRafael Mendonça França2015-01-291-8/+8
| |
* | Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-291-28/+93
|/ | | | | | | | 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
* Reset template assertions without warningsbrainopia2015-01-051-2/+4
|
* Remove deprecated option `use_route` in controller testsRafael Mendonça França2015-01-041-23/+1
|
* Integration requests should work in contexts without setup and teardownbrainopia2015-01-021-1/+2
|
* adding that assert_template with :layout will raise ArgumentError for ↵Carsten Wirth2014-12-161-0/+2
| | | | unknown layout type
* Deprecate `use_route` in controller testsGodfrey Chan2014-11-231-1/+22
| | | | Reference #17453
* Make sure assert_select can assert body tagRafael Mendonça França2014-11-181-4/+4
| | | | | | | | | This reverts commit f93df52845766216f0fe36a4586f8abad505cac4, reversing changes made to a455e3f4e9dbfb9630d47878e1239bc424fb7d13. Conflicts: actionpack/lib/action_controller/test_case.rb actionview/lib/action_view/test_case.rb
* document_root_element need to be publicRafael Mendonça França2014-11-171-4/+4
|
* Pass the route name explicitlyGodfrey Chan2014-11-101-1/+2
| | | | | | Follow up to 212057b9. Since that commit, we need to pass the `route_name` explicitly. This is one of the left-over cases that was not handled in that commit, which was causing `use_route` to be ignored in functional tests.
* Parse HTML as document fragment.Kasper Timm Hansen2014-09-291-1/+1
| | | | This is to match the changes in Rails Dom Testing rails/rails-dom-testing#20.
* Merge branch 'master' into loofahRafael Mendonça França2014-08-171-0/+9
|\ | | | | | | | | Conflicts: actionpack/CHANGELOG.md
| * Fix assert_template for files.Guo Xiang Tan2014-08-141-0/+9
| | | | | | | | | | The test was not failing for `assert_template file: nil` when a file has been rendered.
* | Merge branch 'master' into loofahRafael Mendonça França2014-08-121-43/+14
|\| | | | | | | | | | | | | Conflicts: actionpack/CHANGELOG.md actionpack/test/controller/integration_test.rb actionview/CHANGELOG.md
| * Remove ActionController::RaiseActionExceptions.Guo Xiang Tan2014-08-071-34/+0
| | | | | | | | | | The latest modification to the code was done in https://github.com/rails/rails/commit/5e3517ea. In Rails 3.2, `ActionController#rescue_action` was deprecated and `rescue_action_without_handler` is no longer being used.
| * avoid testing only_pathAaron Patterson2014-08-041-2/+1
| | | | | | | | | | we know that this call only wants the path returned, so lets call a method that returns the path.
| * Bug fix for assert_template when opening a new session.Guo Xiang Tan2014-07-251-5/+9
| | | | | | | | See https://github.com/rails/rails/pull/16234#commitcomment-7115670.
| * Fix AC::TemplateAssertions instance variables not resetting.Guo Xiang Tan2014-07-211-5/+7
| | | | | | | | Fixes https://github.com/rails/rails/issues/16119.
* | We don't need loofah for the assertionsRafael Mendonça França2014-07-151-1/+0
| | | | | | | | We can just use nokogiri
* | Merge pull request #11218 from kaspth/loofah-integrationRafael Mendonça França2014-07-101-0/+9
|\ \ | |/ |/| | | | | | | | | | | Loofah-integration Conflicts: actionpack/CHANGELOG.md actionview/CHANGELOG.md
| * Moved html_document to ActionDispatch::Assertions. Included the ↵Timm2014-06-161-6/+1
| | | | | | | | Rails::Dom::Testing::Assertions there as well.
| * Support for changes in SelectorAssertions.Timm2014-06-161-0/+14
| |
| * Moved ActionView::Assertions dependency from Action Pack's lib to ↵Timm2014-06-161-2/+0
| | | | | | | | abstract_unit.rb.
| * Require ActionView::Assertions in ActionController test_case.rb.Timm2014-06-161-0/+1
| |
| * Moved Dom and Selector assertions from ActionDispatch to ActionView.Timm2014-06-161-0/+1
| |
* | Reduce number of subscriptions created.Guo Xiang Tan2014-07-081-17/+13
| |
* | Remove symbolized_path_parameters.Guo Xiang Tan2014-07-021-1/+0
| | | | | | | | This pull request is a continuation of https://github.com/rails/rails/commit/925bd975 and https://github.com/rails/rails/commit/8d8ebe3d.
* | Merge pull request #15537 from tgxworld/fix_state_leakMatthew Draper2014-06-201-1/+0
|\ \ | | | | | | Fix state leak.
| * | Prevent state leak.Guo Xiang Tan2014-06-051-1/+0
| |/
* / Set flash in test session when necessary.Guo Xiang Tan2014-06-121-2/+5
|/ | | | `to_session_value` returns nil when empty.
* use symbol keys for path_parametersAaron Patterson2014-05-221-5/+5
|
* Fix examples indent and improve #process docs a bit [ci skip]Carlos Antonio da Silva2014-05-041-16/+14
|
* Document ActionController::TestCase::Behavior#processGaurish Sharma2014-05-041-0/+27
| | | | [ci skip]
* Fix subscriptions not being unsubscribed.Guo Xiang Tan2014-04-141-5/+7
|
* update comments to reflect that options support is not availableFrederick Cheung2014-03-251-2/+2
|
* use the body proxy to freeze headersAaron Patterson2014-03-121-1/+1
| | | | | | avoid freezing the headers until the web server has actually read data from the body proxy. Once the webserver has read data, then we should throw an error if someone tries to set a header
* only write the jar if the response isn't committedAaron Patterson2014-03-121-1/+15
| | | | | | | | | | | when streaming responses, we need to make sure the cookie jar is written to the headers before returning up the stack. This commit introduces a new method on the response object that writes the cookie jar to the headers as the response is committed. The middleware and test framework will not write the cookie headers if the response has already been committed. fixes #14352
* live controllers should have live responsesAaron Patterson2014-02-281-6/+22
| | | | | | detect the type of controller we're testing and return the right type of response based on that controller. This allows us to stop doing the weird sleep thing.
* Fix controller test not resetting @_url_optionsTony Wooster2014-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4f2cd3e9 introduced a bug by reordering the call to `@controller.recycle!` above the call to `build_request_uri`. The impact of this was that the `@_url_options` cache ends up not being reset between building a request URI (occurring within the test controller) and the firing of the actual request. We encountered this bug because we had the following setup: class MinimumReproducibleController < ActionController::Base before_filter { @param = 'param' } def index render text: url_for(params) end def default_url_options { custom_opt: @param } end end def test_index get :index # builds url, then fires actual request end The first step in `get :index` in the test suite would populate the @_url_options cache. The subsequent call to `url_for` inside of the controller action would then utilize the uncleared cache, thus never calling the now-updated default_url_options. This commit fixes this bug calling recycle! twice, and removes a call to set response_body, which should no longer be needed since we're recycling the request object explicitly.
* Clear filtered request attributes between requests in testsAndrew White2014-01-271-0/+3
| | | | | | | | The request attributes filtered_parameters, filtered_env and filtered_path are memoized for performance reasons. However this can cause unusual behavior in tests where there are multiple calls to get, post, etc. Fixes #13803.
* Re-remove deprecated API.kennyj2013-06-281-12/+0
|
* Revert "Add the options method to action_controller testcase."Rafael Mendonça França2013-05-161-6/+0
| | | | | | | | | | | | This reverts commit 0303c2325fab253adf5e4a0b738cb469c048f008. Conflicts: actionpack/lib/action_controller/test_case.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.
* use canonical #controller_path logic in controller test casesLance Ivy2013-05-051-1/+1
|
* applies documentation guidelinesXavier Noria2013-04-221-11/+12
|
* Remove unused block parametersAgis Anastasopoulos2013-04-071-3/+3
|
* Prefer find_by over dynamic finders in rdocSam Ruby2013-04-021-1/+1
|