aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
Commit message (Collapse)AuthorAgeFilesLines
* Backport #5808Mack Earnhardt2013-03-241-0/+37
| | | | | | df36c5f - Fix assert_template assertion with :layout option 4bd05a7 - Fix assert_template :layout => nil assertion 0d19a08 - Improve assert_template layout checking
* Merge pull request #9802 from newsline/fix-broken-action-missingRafael Mendonça França2013-03-201-0/+12
| | | | | | | | | | | | Fix missing action_missing Conflicts: actionpack/CHANGELOG.md Conflicts: actionpack/test/controller/base_test.rb Fixes #9799
* Extract hardcoded lists to Redo::RestaurantsListJuan Barreneche2013-03-141-0/+9
|
* Do not run this streaming test in Ruby 1.8, fix syntax errorCarlos Antonio da Silva2013-01-171-5/+8
|
* Merge pull request #5288 from lest/patch-2José Valim2013-01-171-0/+13
| | | | | | force response body to be read in assert_template Conflicts: actionpack/lib/action_controller/test_case.rb
* Merge branch '3-2-sec' into 3-2-secmergeAaron Patterson2013-01-081-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 3-2-sec: bumping version CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml. * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * dealing with empty hashes. Thanks Damien Mathieu Avoid Rack security warning no secret provided Conflicts: actionpack/CHANGELOG.md activerecord/CHANGELOG.md activesupport/CHANGELOG.md
| * CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml.Jeremy Kemper2013-01-081-0/+13
| |
* | backport #4f0f1b5 into 3-2-stable. because 1.9.3-p362 warned unused variables.SHIBATA Hiroshi2013-01-051-1/+2
| | | | | | | | | | Conflicts: actionpack/test/controller/render_test.rb
* | Use Ruby 1.8 syntaxRafael Mendonça França2013-01-021-2/+2
| |
* | Backport #8701, do not append a second slash with `trailing_slash: true`Yves Senn2013-01-021-5/+15
| |
* | Use 1.8 hash styleCarlos Antonio da Silva2012-12-031-1/+1
| |
* | Override <%== to always behave as literal text rather than toggling based on ↵Jeremy Kemper2012-12-031-2/+8
| | | | | | | | | | | | | | whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged. Conflicts: actionpack/test/template/template_test.rb
* | Accept symbols as #send_data :disposition valueElia Schito2012-11-271-1/+13
|/
* Revert "Merge pull request #7659 from HugoLnx/template_error_no_matches_rebased"Rafael Mendonça França2012-10-311-22/+0
| | | | | | | | | | | | | This reverts commit 7d17cd2cbfc086f5aa9dd636e1207eb130150428. Conflicts: actionpack/CHANGELOG.md Reason: This added a regression since people were relying on this buggy behavior. This will introduce back #3849 but we will be backward compatible in stable release. Fixes #8068.
* Use the Ruby 1.8 hash syntaxRafael Mendonça França2012-10-061-1/+1
|
* Merge pull request #7848 from senny/3415_assert_template_has_nil_variableRafael Mendonça França2012-10-061-0/+11
| | | | | | can't pass :locals to #assert_template without a view test case (#3415) Conflicts: actionpack/CHANGELOG.md
* Since File instance doesn't respond to #open use a double to test theRafael Mendonça França2012-09-301-3/+2
| | | | behavior added at c53e5def08f7a289a92a8e5f79dcd7caa5c3a2fb
* Merge pull request #7659 from HugoLnx/template_error_no_matches_rebasedRafael Mendonça França2012-09-301-0/+22
| | | | | | | REBASED: fixing assert_template bug when template matches expected, but not ends with Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_controller/test_case.rb
* Don't paramify ActionDispatch::Http::UploadedFile in testsTim Vandecasteele2012-09-291-0/+7
| | | | | | | | | | To test uploading a file without using fixture_file_upload, a posted ActionDispatch::Http::UploadedFile should not be paramified (just like Rack::Test::UploadedFile). (Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't share the same API, tempfile is not accessible on Rack::Test::UploadedFile as discussed in https://github.com/brynary/rack-test/issues/30)
* log 404 status when ActiveRecord::RecordNotFound was raised (#7646)Yves Senn2012-09-171-0/+15
| | | | | | Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_controller/log_subscriber.rb
* html_escape should escape single quotesSantiago Pastorino2012-08-022-3/+3
| | | | | | | | | | | | https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content Closes #7215 Conflicts: actionpack/test/template/erb_util_test.rb actionpack/test/template/form_tag_helper_test.rb actionpack/test/template/text_helper_test.rb actionpack/test/template/url_helper_test.rb activesupport/lib/active_support/core_ext/string/output_safety.rb
* Show in log correct wrapped keysDmitry Vorotilin2012-07-051-0/+8
|
* Added test for case when view doesn't have logger method when using ↵Dmitry Vorotilin2012-06-161-0/+17
| | | | ActionController::Metal controller.
* adding a test for #6459Aaron Patterson2012-06-141-0/+10
|
* Add test to flash sweep after two redirectsRafael Mendonça França2012-06-051-0/+20
| | | | | This test is needed to avoid regressions in the way that flash works now (swept in every request).
* Include routes.mounted_helpers into integration testsPiotr Sarnacki2012-06-011-0/+19
| | | | | | | | | | | | | | | 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)
* Refactor the handling of default_url_options in integration testsAndrew White2012-05-101-0/+80
| | | | | | | | | | | | 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
* Add failing test re #3436 which demonstrates content_type is not respected ↵Kunal Shah2012-05-071-0/+21
| | | | when using the :head method/shortcut
* Add a role option to wrap_parameters.Nick Ragaz2012-05-041-2/+15
| | | | The role option identifies which parameters are accessible and should be wrapped. The default role is :default.
* Don't convert params if the request isn't HTML - fixes #5341Andrew White2012-04-291-2/+40
| | | | | | | | (cherry picked from commit 7a80b69e00f68e673c6ceb5cc684aa9196ed3d9f) Conflicts: actionpack/test/controller/test_test.rb
* default_url_options does not receive one argument anymoreRafael Mendonça França2012-04-081-1/+1
|
* Remove the leading \n added by textarea on assert_selectSantiago Pastorino2012-03-301-0/+7
|
* Set proper rendered_format when doing render :inlineSantiago Pastorino2012-03-281-0/+1
| | | | Closes #5632
* Cover one more case in auth_token and remote formsPiotr Sarnacki2012-03-281-16/+22
| | | | | If embedding auth_token in remote forms is off and we pass a value for auth_token it should respect it.
* Added config.action_view.embed_authenticity_token_in_remote_formsPiotr Sarnacki2012-03-281-6/+48
| | | | | | | | There is a regression introduced in 16ee611fa, which breaks remote forms that should also work without javascript. This commit introduces config option that allows to configure this behavior defaulting to the old behavior (ie. include authenticity token in remote forms by default)
* If partial is rendered in controller, grab format from templatePiotr Sarnacki2012-03-271-0/+13
| | | | | | | | | Previously `rendered_format` was set only based on mime types passed in Accept header, which was wrong if first type from Accept was different than rendered partial. The fix is to simply move setting rendered_format to the place where template is available and grab format from the template. If it fails we can fallback to formats passed by Accept header.
* Build fix for ruby1.8.7-358Arun Agrawal2012-03-191-1/+1
|
* Add missing test for #5308Piotr Sarnacki2012-03-171-0/+13
|
* Fix #5440 - multiple render_to_string breaks partials formatsPiotr Sarnacki2012-03-171-0/+26
| | | | | | | | | This fixes situation where rendering template to string sets `rendered_format` to the format rendered there. This is ok to have consistent formats rendered in partials, but it breaks on next renders if format is explicitly set or on last render where default format does not necessarily need to be the format of first rendered template.
* Merge pull request #5457 from brianmario/typo-fixAaron Patterson2012-03-151-1/+1
| | | | Fix typo in redirect test
* Merge pull request #5456 from brianmario/redirect-sanitizationAaron Patterson2012-03-151-0/+20
| | | | Strip null bytes from Location header
* Remove ActionController::TestCase#rescue_action_in_public!Piotr Sarnacki2012-03-151-5/+0
| | | | | | This method has no effect since exception handling was moved to middlewares and ActionController tests do not use any middlewares.
* Allow you to force the authenticity_token to be rendered even on remote ↵David Heinemeier Hansson2012-03-141-0/+11
| | | | forms if you pass true
* Do not include the authenticity token in forms where remote: true as ajax ↵David Heinemeier Hansson2012-03-141-0/+11
| | | | forms use the meta-tag value
* Add test case for #5307Carlos Antonio da Silva2012-03-071-2/+6
|
* Failing test for mime responder respond_with using a block.Mario Visic2012-03-051-0/+36
|
* Fix #5238, rendered_format is not set when template is not renderedPiotr Sarnacki2012-03-021-2/+6
|
* Adding tests for non-optional glob parametersAndrew White2012-02-261-2/+27
|
* assert => assert_equalArun Agrawal2012-02-251-3/+3
|
* Checking headers in a better way. as doing hereArun Agrawal2012-02-251-4/+3
| | | | 406ece4729e8fd81f156bcb3fce16e938522466e