aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
Commit message (Collapse)AuthorAgeFilesLines
* Disable the Accept header by defaultMichael Koziarski2008-07-074-9/+22
| | | | | | | | The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too. You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set: config.action_controller.use_accept_header = true A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present. This lets ajax pages still use format.js despite there being no params[:format]
* Simplify the implementation of assert_redirected_to to normalise the urls ↵Michael Koziarski2008-07-043-23/+8
| | | | | | before comparing. Also allows for a simpler implementation of redirect_to without most of the recursion. Also allows for assert_redirected_to @some_record
* Remove old broken follow_redirect from functional tests. Still works in ↵Michael Koziarski2008-07-042-34/+0
| | | | | | integration tests. The follow_redirect in functional tests only worked if you used redirect_to :id=>foo, :action=>bar, rather than named routes.
* Revert "Moved TemplateHandlers to Base"Joshua Peek2008-07-031-1/+1
| | | | | | | | | This reverts commit 42d215a925a228778e43f7040f03ad8f3eb5341c. Conflicts: actionpack/lib/action_view/inline_template.rb actionpack/lib/action_view/template.rb
* Allow caches_action to accept cache store options. [#416 state:resolved]josevalim2008-07-041-1/+9
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Moved TemplateHandlers to BaseJoshua Peek2008-07-031-1/+1
|
* Move template_format logic out to the request so it's alongside the ↵Michael Koziarski2008-07-031-2/+1
| | | | | | 'regular' request format. Use xhr? instead of the expensive trip through Request#accepts.
* Tighten the rescue clause here to prevent hiding strange mock related errors ↵Michael Koziarski2008-07-031-1/+1
| | | | behind the line offset test
* Use :namespace instead of :path_prefix for finding controller. [#544 ↵Tarmo Tänav2008-07-031-0/+20
| | | | | | | | | | state:resolved] :namespace is supposed to be the module where controller exists. :path_prefix can contain anything, including variables, which makes it unsuitable for determining the module for a controller. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Deprecate :use_full_path render option. The supplying the option no longer ↵Joshua Peek2008-07-021-4/+4
| | | | has an effect.
* Added application/jsonrequest as a synonym for application/jsonMike Subelsky2008-07-021-4/+10
| | | | [#536 state:resolved]
* Add :as option to render a collection of partials with a custom local ↵Pratik Naik2008-07-021-0/+9
| | | | variable name. [#509 state:resolved] [Simon Jefford, Pratik Naik]
* Make sure render :template works with :locals. [#524 state:resolved]Tim Haines2008-07-021-0/+9
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improved test coverage and added RackRequest support for CGI environment ↵Joshua Peek2008-07-012-17/+124
| | | | variables.
* Set precompiled fixture load path constant to speed up testsJoshua Peek2008-06-2511-144/+135
|
* Consolidate CustomHandlerTest, TemplateFileTest, and TemplateObjectTest and ↵Joshua Peek2008-06-252-60/+15
| | | | test them at a higher level of abstraction in ViewRenderTest.
* Patched HTML::Document#initialize call to Node.parse so that it includes the ↵Jimmy Baker2008-06-241-0/+25
| | | | strict argument. [#330]
* Fixed polymorphic_url to be able to handle singleton resources.Tammer Saleh2008-06-221-0/+33
| | | | | | | Example usage: polymorphic_url([:admin, @user, :blog, @post]) # => admin_user_blog_post_url(@user, @post) [#461 state:resolved]
* Improved test coverage for integration test's apiJoshua Peek2008-06-171-5/+88
|
* Replaced TemplateFinder abstraction with ViewLoadPathsJoshua Peek2008-06-171-43/+68
|
* Fix url_for with no arguments when default_url_options is not explicitly ↵Luke Redpath2008-06-171-1/+17
| | | | | | defined. [#339 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* verify :redirect_to => :back should redirect to the referrer. [#280 ↵Amos King2008-06-171-17/+34
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Revert "Lazy load cache and session stores"David Heinemeier Hansson2008-06-122-2/+1
| | | | This reverts commit 19895f087c338d8385dff9d272d30fb87cb10330.
* Improve ActionCaching's format-handlingJonathan del Strother2008-06-111-5/+48
| | | | | | | | Make ActionCaching more aware of different mimetype formats. It will now use request.format to look up the cache type, in addition to the path extension. When expiring caches, the request format no longer affects which cache is expired. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Delegate ActionView::Base#controller_name to controllerPratik Naik2008-06-101-3/+12
|
* Lazy load cache and session storesPratik Naik2008-06-102-1/+2
|
* Wrap CGIResponse, LegacyRouteSet, Route, RouteSet and RouteLoading tests ↵Joshua Peek2008-06-072-1654/+1627
| | | | inside mocha block.
* Remove some internal dead code that supported content_forJeremy Kemper2008-06-061-19/+1
|
* Merge branch 'master' into erboutJeremy Kemper2008-06-051-2/+12
|\
| * Ensure render :file works inside templatesPratik Naik2008-06-051-0/+10
| |
| * Make partial counter start from 0.Frederick Cheung2008-06-051-2/+2
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Merge branch 'master' into erboutJeremy Kemper2008-06-051-4/+4
|\|
| * Use CGI::Cookie::parse for request cookies until we officially deprecated CGI.Joshua Peek2008-06-041-4/+4
| |
* | Merge branch 'master' into erboutJeremy Kemper2008-06-036-8/+43
|\|
| * Merge branch 'master' of git@github.com:rails/railsDavid Heinemeier Hansson2008-06-031-3/+20
| |\
| | * Fix assert_redirected_to for nested controllers and named routesGabe da Silveira2008-06-041-3/+20
| | | | | | | | | | | | | | | | | | [#308 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
| * | Fixed Request#remote_ip to only raise hell if the HTTP_CLIENT_IP and ↵David Heinemeier Hansson2008-06-031-0/+3
| |/ | | | | | | HTTP_X_FORWARDED_FOR doesnt match (not just if theyre both present) [Mark Imbriaco, Bradford Folkens]
| * Allow caches_action to accept a layout option [#198 state:resolved]josevalim2008-06-031-0/+15
| | | | | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
| * Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-033-5/+5
| | | | | | | | ActiveSupport [#238 state:resolved]
* | Stack @output_buffer for nested renderingJeremy Kemper2008-06-031-1/+1
| |
* | Work with @output_buffer instead of _erboutJeremy Kemper2008-06-021-1/+3
|/
* Ensure Rack processor reads CGI output_cookies for the session cookie.Joshua Peek2008-06-021-4/+52
|
* Added Rack processorEzra Zygmuntowicz2008-06-012-0/+183
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Ruby 1.9 compat: ensure binary encoding for post body parsingJeremy Kemper2008-05-191-5/+15
|
* Ruby 1.9 compat: qualify module name within module_evaled blockJeremy Kemper2008-05-191-1/+1
|
* Test for assert_response for failure response without an exception. [#141 ↵Chris Hapgood2008-05-191-0/+14
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add fragment_exist? and exist? methods to cache stores. [#203 state:resolved]José Valim2008-05-191-20/+22
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure routing generator works with non-string keys. [#172 state:resolved]Sven Fuchs2008-05-161-0/+7
| | | | | | | | | | Make sure that (with recent correction to globbed parameter escaping) non-string values can still be passed route generation helpers for globbed route segments. For example, foo_path([1, 2, 3]) should still work for a route like map.foo "*globbed" by implicitely calling to_s on the Fixnums. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* One last fix to test_filter_parameters_is_protected.Joshua Peek2008-05-141-1/+1
|
* Clean up previously commited test.Joshua Peek2008-05-141-2/+2
|