aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
Commit message (Collapse)AuthorAgeFilesLines
* we're not supporting SQLite 2Akira Matsuda2012-12-241-13/+5
|
* Merge pull request #8085 from acapilleri/format_never_nilGuillermo Iguaran2012-12-222-2/+11
|\ | | | | if format is unknown NullMimeTypeObject is returned
| * return Mime::NullType if format is unknownAngelo Capilleri2012-12-222-2/+11
| | | | | | | | | | | | | | | | | | | | If a request has an unknown format, the methods html?, xml?, json? ...etc not raise an Exception. This patch add a class Mime::NullType, that is returned when request.format is unknown and it responds false to the methods that ends with '?' and true to 'nil?'. It refers to #7837, this issue is considered a improvement not a bug.
* | Merge pull request #8586 from balexand/cache_digests_regexRafael Mendonça França2012-12-212-1/+11
|\ \ | |/ |/| Digestor explicit dependency should not contain trailing whitespace
| * Digestor explicit dependency should not contain trailing whitespaceBrian Alexander2012-12-212-1/+11
| | | | | | | | test for rails/rails#8586
* | Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-211-10/+0
| | | | | | | | with Rails 4.0.
* | Merge pull request #7312 from krainboltgreene/http-token-parser-bugSteve Klabnik2012-12-211-6/+29
|\ \ | |/ |/| Http token parser bug
| * Refactoring the token_and_options method to fix bugsKurtis Rainbolt-Greene2012-12-151-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a test for the equal trun bug Adding a test for the after equal trunc bug Adding a test for the slash bug Adding a test for the slash quote bug Adding a helper method for creating a sample request object with token Writing a method to create params array from raw params Writing a method to rewrite param values in the params Writing a method to get the token params from an authorization value Refactoring the token_and_options method to fix bugs Removing unnessecary test A constant for this shared regex seemed appropriate Wanting to split up this logic Adding small documentation pieces
* | Integrate Journey into Action DispatchAndrew White2012-12-1913-0/+1615
| | | | | | | | | | | | | | | | Move the Journey code underneath the ActionDispatch namespace so that we don't pollute the global namespace with names that may be used for models. Fixes rails/journey#49.
* | Remove obfuscation support from mail_to helperNick Reed2012-12-181-56/+0
| | | | | | | | | | | | Removes support for :encode, :replace_at, and :replace_dot options from the mail_to helper. Support for these options has been extracted to the 'actionview-encoded_mail_to' gem.
* | handle protocol option in stylesheet_link_tag and javascript_include_tagVasiliy Ermolovich2012-12-181-1/+23
|/ | | | closes #8388
* Merge pull request #8497 from acapilleri/conditional_cacheRafael Mendonça França2012-12-141-16/+16
|\ | | | | | | Removed :if / :unless conditions to fragment cache in favour of *cache_i...
| * Removed :if and :unless from fragment cache option in favour ofAngelo capilleri2012-12-141-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cache_if(condition, option, &block) and cache_unless(condition, option, &block). In the PR #8371 was introduced conditional options :if and :unless in the cache method. Example: <%= cache @model, if: some_condition(@model) do %> ... <%end%> This is a good feature but *cache_if* and and *cache_unless* are more concise and close to the standard of rails view helpers (ex: link_to_if and link_to_unless). Example: <%= cache_if condition, @model do %> ... <%end%>
* | Clear url helper methods when routes are reloadedAndrew White2012-12-141-0/+86
|/ | | | | Remove all the old url helper methods when clear! is called on the route set because it's possible that some routes have been removed.
* Fix rewinding in ActionDispatch::Request#raw_postMatt Venables2012-12-111-0/+7
| | | | | | | | | If env['RAW_POST_DATA'] is nil, #raw_post will attempt to set it to the result of #body (which will return env['rack.input'] if env['RAW_POST_DATA'] is nil). #raw_post will then attempt to rewind the result of another call to #body. Since env['RAW_POST_DATA'] has already been set, the result of #body is not env['rack.input'] anymore. This causes env['rack.input'] to never be rewound.
* Merge pull request #8476 from sheerun/fix/multipart-getRafael Mendonça França2012-12-101-0/+12
|\ | | | | Prevent raising EOFError on multipart GET request.
| * Prevent raising EOFError on multipart GET request.Adam Stankiewicz2012-12-101-0/+12
| | | | | | | | | | | | | | | | | | | | Such request can happen on Internet Explorer. When we redirect after multipart form submission, the request type is changed to GET, but Content-Type is preserved as multipart. GET request cannot have multipart body and that caused Rails to fail. It's similar fix to Rack's one: https://github.com/chneukirchen/rack/blob/8025a4ae9477d1e6231344c2b7d795aa9b3717b6/lib/rack/request.rb#L224
* | use _action callbacks in actionmailerFrancesco Rodriguez2012-12-081-5/+5
| |
* | add tests to aliased _filter callbacksFrancesco Rodriguez2012-12-071-0/+46
| |
* | use `_action` instead of `_filter` callbacksFrancesco Rodriguez2012-12-073-26/+24
| |
* | update documentation and code to use _action callbacksFrancesco Rodriguez2012-12-0711-18/+18
| |
* | Rename all action callbacks from *_filter to *_actionDavid Heinemeier Hansson2012-12-071-5/+5
|/
* Revert "Invert precedence of content in ActionDispatch::Static"Andrew White2012-12-071-10/+5
| | | | This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
* Invert precedence of content in ActionDispatch::StaticAndrew White2012-12-061-5/+10
| | | | | | | | | | This commit inverts the precedence in ActionDispatch::Static so that dynamic content will be served before static content. This is so that precompiled assets do not inadvertently get included when running in development mode - it should have no effect in production where static files are usually handled by the web server. Closes #6421
* Allow fragment cache to accept :if and :unless optionsFabrizio Regini2012-12-051-0/+64
| | | | [Stephen Ausman + Fabrizio Regini]
* Adding filter capability to ActionController logsFabrizio Regini2012-12-051-0/+22
|
* Fixed issue where routes with globs caused constraints on that glob toMaura Fitzgerald2012-12-041-0/+29
| | | | | | be ignored. A regular expression constraint gets overwritten when the routes.rb file is processed. Changed the overwriting to an ||= instead of an = assignment.
* Override <%== to always behave as literal text rather than toggling based on ↵Jeremy Kemper2012-12-032-4/+10
| | | | whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged.
* More descriptive error when rendering a partial with `:layout => true`Yves Senn2012-12-021-0/+5
|
* hash filters should be accessed with symbols or stringsFrancesco Rodriguez2012-11-301-0/+25
|
* Remove observers and sweepersRafael Mendonça França2012-11-283-58/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Merge pull request #8318 from Empact/fixture-fileRafael Mendonça França2012-11-271-0/+12
|\ | | | | Use File.join to better integrate fixture_path in fixture_file_upload.
| * Use File.join to better integrate fixture_path in fixture_file_upload.Ben Woosley2012-11-261-0/+12
| |
* | No sort Hash options in #grouped_options_for_selectSergey Kojin2012-11-271-1/+1
| |
* | Accept symbols as #send_data :disposition valueElia Schito2012-11-271-0/+12
| |
* | Improve clarity of routing testsAndrew White2012-11-261-634/+1081
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the routes for each test inside the test method so that it's easier to see which routes are applicable to which test. To ensure that each test wasn't invalidated the changes were done by first removing all of the routes, ensuring that all of the tests failed and then adding the routes back to each test one by one. One test for `assert_recognizes` was removed as it wasn't actually testing the defined routes and is now tested more thoroughly in routing_assertions_test.rb. One downside is that the test suite takes about 1s longer due to having to using `method_missing` for handling the url helpers as using `include url_helpers` isn't isolated for each test.
* | Merge pull request #8316 from roberto/assert_template_validate_optionsCarlos Antonio da Silva2012-11-261-0/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | assert_template: validating option keys It only handles the keys locals, partial, layout and count. assert_template(foo: "bar") # raises ArgumentError assert_template(leiaute: "test") # raises ArgumentError
| * | assert_template: validating option keysRoberto Soares2012-11-251-0/+6
| | |
* | | Merge pull request #8317 from latortuga/cache-digest-opt-outDavid Heinemeier Hansson2012-11-262-0/+15
|\ \ \ | |/ / |/| | Add explicit opt-out for fragment cache digesting
| * | Add explicit opt-out for fragment cache digestingDrew Ulmer2012-11-252-0/+15
| |/ | | | | | | | | | | | | | | | | This add support for sending an explicit opt-out of the "Russian-doll" cache digest feature on a case-by-case basis. This is useful when cache- expiration needs to be performed manually and it would be otherwise difficult to know the exact name of a digested cache key. More information: https://github.com/rails/cache_digests/pull/16
* | `assert_template` fails with empty string.Roberto Soares2012-11-231-0/+7
| |
* | `assert_template` fails with empty string when a template has been renderedRoberto Soares2012-11-231-0/+7
|/ | | | | | | | For instance, it prevents false positive in this case: file = nil get :index assert_template("#{file}")
* Allow setting a symbol as path in scope on routesGuillermo Iguaran2012-11-211-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Was surprising found that this example doesn't work: scope :api do resources :users end and the right form to use it is: scope 'api' do resources :users end I think this should work similary as `namespace` where both are allowed. These two are equivalent: namespace :api do resources :users end namespace 'api' do resources :user end
* Merge pull request #8183 from jcoglan/objectless_sessionsJon Leighton2012-11-211-0/+21
|\ | | | | Store FlashHashes in the session as plain hashes
| * Store FlashHashes in the session as plain hashes rather than custom objects ↵James Coglan2012-11-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with unstable class names and instance variables. Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value. Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation. Remove blank lines I introduced in controller/test_case.rb. Unit tests for FlashHash#to_session_value. Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+. Test that Rails 3.2 session flashes are correctly converted to the new format. Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize. Fix session['flash'] deletion condition: it will never be empty?, it will either be nil or a hash with 'discard' and 'flashes' keys.
* | Correct the use of params options when given to url_forCarlos Antonio da Silva2012-11-191-9/+3
| | | | | | | | Merge url for tests and add changelog entry for #8233.
* | Fix issue with params in url_fortumayun2012-11-191-0/+8
| | | | | | | | | | | | With a "params" argument, the following error is raised: undefined method `reject!` for "":String
* | Refactor request tests, remove #with_set methodCarlos Antonio da Silva2012-11-191-8/+3
| |
* | render every partial with a new `PartialRenderer`.Yves Senn2012-11-191-0/+10
| | | | | | | | | | | | | | | | This resolves issues when rendering nested partials. Previously the `PartialRenderer` was reused which led to situations where the state of the renderer was reset. Closes #8197
* | Fix failing template testsCarlos Antonio da Silva2012-11-161-2/+2
| | | | | | | | Introduced in 4a4de567b45ff28035419bc2d92f9b206e3c0a66.