aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
Commit message (Collapse)AuthorAgeFilesLines
* just use normal ruby for stubbingAaron Patterson2011-07-231-5/+3
|
* Simple fix to the NoMethodError noted in #2177.Ben Woosley2011-07-231-1/+0
| | | Unfortunately #respond_to?(:controller) won't work as suggested, nor will respond_to?(:params), as #controller is present and #params is delegated to #controller. #delegate makes respond_to? return true regardless whether the target responds to it.
* Check Accept and Content-Type headers before evaluating them in xhr ↵ogeidix2011-07-191-0/+6
| | | | | | requests. Closes #2119 An xhr request must have an "Accept" or "Content-type" header in order to be considered a request with valid_accept_header.
* Ensure that status codes are logged properlyJesse Storimer2011-07-181-0/+19
| | | | | | Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue so that status codes rendered from rescue_from blocks are logged properly.
* Merge pull request #2046 from sikachu/master-test_fixSantiago Pastorino2011-07-171-2/+6
|\ | | | | Fix a wrong assertion on url_helper_test, and add missing `#html_safe?` a
| * Fix a wrong assertion on url_helper_test, and refactor `html_safe` test to ↵Prem Sichanugrist2011-07-171-2/+6
| | | | | | | | be in its method
* | Merge pull request #2018 from bhus/render_partial_invalid_checkSantiago Pastorino2011-07-172-0/+10
|\ \ | |/ |/| Render partial invalid check
| * Added view template invalid name check, along with tests. No merges in commit.huskins2011-07-132-0/+10
| |
* | assert nothing raised for setting a cookie value to nil in ActionDispatchBradford Folkens2011-07-141-0/+5
|/
* Fixed session ID fixation for ActiveRecord::SessionStoreJoseph Wong2011-07-121-0/+31
| | | | | | | | | | | | | | | | | I have found that Rails will take an invalid session ID specified by the client and materialize a session based on that session ID. This means that it is possible, among other things, for a client to use an arbitrarily weak session ID or for a client to resurrect a previous used session ID. In other words, we cannot guarantee that all session IDs are generated by the server and that they are (statistically) unique through time. The fix is to always generate a new session ID in #get_session if an existing session cannot be found under the incoming session ID. Also added new tests that make sure that an invalid session ID is never materialized into a new session, regardless of whether it comes in via a cookie or a URL parameter (when :cookie_only => false).
* Grouped select helperAndrew Radev2011-07-111-0/+36
| | | | FormBuilder#select now works with a nested data structure.
* config should always be an AS::InheritableOptions object. Closes #1992Santiago Pastorino2011-07-081-0/+4
|
* use Zlib.crc2 rather that bytes.sum, as per Aaron's suggestionXavier Noria2011-07-081-1/+2
| | | | | | That integer is rather irrelevant, the only thing that matters is that it is consistent and with no apparent bias. Zlib.crc32 is 8-10 times faster than bytes.sum, so use that.
* removing brittle assertionAaron Patterson2011-07-071-1/+0
|
* Using the sum of bytes instead the hash of the path when replacing the ↵Albert Callarisa Roca2011-07-081-2/+3
| | | | wildcard of the assets path because in ruby 1.9 is not consistent
* Remove stream at the class level.José Valim2011-07-061-1/+1
| | | | | | This is because only template rendering works with streaming. Setting it at the class level was also changing the behavior of JSON and XML responses, closes #1337.
* Merge pull request #1925 from spohlenz/refactor-asset-pathsJosé Valim2011-07-022-0/+13
|\ | | | | Refactor sprockets asset paths to allow for alternate asset environments
| * Add tests for alternate asset prefix/environmentSam Pohlenz2011-07-012-0/+13
| |
* | provide a more explicit message when using url_for with nilDamien Mathieu2011-07-022-0/+15
| | | | | | This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
* | Revert "Add method fields_for_with_index to FormHelper"José Valim2011-07-011-125/+0
| | | | | | | | | | | | | | | | This reverts commit 7c562d5e460d97b18e4f3367b3cfb13401732920. Conflicts: actionpack/lib/action_view/helpers/form_helper.rb
* | Merge pull request #1927 from bogdan/select_multiple_indexJosé Valim2011-07-011-0/+7
|\ \ | |/ |/| Fixed ActionView::FormOptionsHelper#select with :multiple => false
| * Fixed ActionView::FormOptionsHelper#select with :multiple => falseBogdan Gusiev2011-06-301-0/+7
| |
* | Make sure respond_with with :js tries to render a template in all casesJosé Valim2011-06-302-6/+16
| |
* | Add has_key? and key? methods to CookieJar removed in 0ca69ca65f83b4bb34f8José Valim2011-06-301-0/+9
|/
* No need to register again. As it's default now.Arun Agrawal2011-06-281-3/+3
| | | Removing gif from here because when it got unregister it start failing other places.
* Fix test to use Mime::ZipArun Agrawal2011-06-281-1/+1
|
* Make send_file guess content-type from file extension, if type wasn't ↵Esad Hajdarevic2011-06-281-0/+19
| | | | supplied (Issue #1847). Update tests & documentation.
* Merge pull request #1870 from chriseppstein/asset_urls_masterSantiago Pastorino2011-06-272-14/+87
|\ | | | | Asset urls master
| * Added a configuration setting:Chris Eppstein2011-06-272-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.action_controller.default_asset_host_protocol It's best to leave this unset. When unset the :request protocol is used whenever it can be and :relative is used in the other situations. When set to :request then assets hosts will be disabled when there is no request in scope and will use the request protocol whenever a request is in scope. If set to :relative, then a relative protocol is always used except for stylesheet link tags which must use the :request protocol to avoid double downloads in IE6&7. Conflicts: actionpack/lib/sprockets/helpers/rails_helper.rb actionpack/test/template/sprockets_helper_test.rb
| * Stylesheet link tags should use the request protocol to avoid duplicate ↵Chris Eppstein2011-06-271-8/+8
| | | | | | | | | | | | | | | | | | download of stylesheets in IE7 and IE8. Conflicts: actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb actionpack/lib/sprockets/helpers/rails_helper.rb
| * Add asset_url helper and refactor the asset paths so that asset hosts can be ↵Chris Eppstein2011-06-272-8/+54
| | | | | | | | | | | | | | | | | | | | used during asset precompilation. Conflicts: actionpack/lib/action_view/asset_paths.rb actionpack/lib/sprockets/helpers/rails_helper.rb actionpack/test/template/sprockets_helper_test.rb
* | the generated ALT attribute for images no longer contains the digest, if anyXavier Noria2011-06-271-0/+8
|/
* Get the fixture_path from self.class instead of ActiveSupport::TestCase.David Chelimsky2011-06-251-0/+7
| | | | | | 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.
* Merge pull request #1796 from jdeseno/masterSantiago Pastorino2011-06-221-0/+7
|\ | | | | link_to doesn't allow rel attribute when also specifying method
| * Adds a test to check link_to with method & rel optionsJosh2011-06-211-0/+7
| |
* | Merge pull request #1798 from jeroenj/cachesweeper-fixSantiago Pastorino2011-06-221-0/+5
|\ \ | | | | | | Fixes an issue where cache sweepers with only after filters would have no controller object
| * | Tests only after filters in cache sweepersJeroen Jacobs2011-06-221-0/+5
| |/
* | Merge pull request #1778 from spohlenz/hash-modelsJosé Valim2011-06-222-0/+27
|\ \ | |/ |/| Fix nested fields_for when Hash-based model is passed.
| * Use real hash model in nested fields_for with hash model testSam Pohlenz2011-06-222-4/+13
| |
| * Test for extractable_options? within nested fields_for.Sam Pohlenz2011-06-201-0/+18
| | | | | | | | | | This fixes an error when a record object that is a subclass of Hash is passed to fields_for, which is incorrectly interpreted as field options.
* | Do not change a frozen text passed to simple_format text helperTadas Tamosauskas2011-06-201-2/+9
|/
* Use assert_equal instead of assert in uploaded file test.Lukáš Konarovský2011-06-151-1/+1
|
* Make MissingTranslation exception handler respect :rescue_formatAndrew White2011-06-151-0/+8
|
* all requests are utf-8. Don't use the external encoding.Damien Mathieu2011-06-141-6/+1
|
* encode the uploaded file's name in the default external encoding - Closes #869Damien Mathieu2011-06-141-0/+12
|
* Define ActiveSupport#to_param as to_str - closes #1663Andrew White2011-06-121-0/+8
|
* Merge pull request #1552 from bogdan/selectPiotr Sarnacki2011-06-111-2/+18
|\ | | | | Fixing select[multiple] html specification problem.
| * Fixing select[multiple] html specification problem.Bogdan Gusiev2011-06-081-2/+18
| | | | | | | | Generating hidden input with same name before each multiple select
* | Merge pull request #549 from dlee/utf8_enforcerJosé Valim2011-06-112-4/+4
|\ \ | | | | | | Utf8 enforcer param customization
| * | There are no snowmen hereDavid Lee2011-06-112-4/+4
| | |