aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-1/+1
| | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
* Fix form_for to work with objects that implement to_modelTravis Grathwell2014-12-291-5/+15
| | | | | | | | | | | | | Previously, if you tried to use form_for with a presenter object that implements to_model, it would crash in action_dispatch/routing/polymorphic_routes.rb when asking the presenter whether it is .persisted? Now, we always ask .persisted? of the to_model object instead. This seems to been an issue since 1606fc9d840da869a60213bc889da6fcf1fdc431 Signed-off-by: Eugenia Dellapenna <eugenia.dellapenna@gmail.com>
* Move test that depends on ActiveRecordclaudiob2014-11-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This commit moves a test from `test/template` to `test/activerecord` since the test depends on ActiveRecord. This matches the documentation from [RUNNING_UNIT_TESTS](https://github.com/rails/rails/blob/f28d1ddd507174ac233b773cc4f35c3c05ad32e7/actionview/RUNNING_UNIT_TESTS.rdoc): > Test cases in the test/activerecord/ directory depend on having activerecord and sqlite3 installed. > If Active Record is not in actionview/../activerecord directory, or the sqlite3 rubygem is not installed, these tests are skipped. > Other tests are runnable from a fresh copy of actionview without any configuration. --- More details about this commit. All the tests starting with `require 'active_record_unit'` are already inside `test/activerecord`, except for the one test this commit moves. If you don't have `active_record` on your machine, the following command currently fails on master: ```bash ```
* Remove internal options from query string of pathsGert Goet2014-09-251-0/+9
| | | | Fixes #17057
* Remove warningRafael Mendonça França2014-09-011-2/+2
|
* Allow polymorphic routes with nil when a route can still be drawnSammy Larbi2014-08-311-2/+34
| | | | | | | | | | | | | | | | Suppose you have two resources routed in the following manner: ```ruby resources :blogs do resources :posts end resources :posts ``` When using polymorphic resource routing like `url_for([@blog, @post])`, and `@blog` is `nil` Rails should still try to match the route to the top-level posts resource. Fixes #16754
* Removed warningRafael Mendonça França2014-08-181-1/+1
|
* Merge pull request #15889 from carnesmedia/model-nameRafael Mendonça França2014-08-171-2/+2
|\ | | | | | | Use #model_name on instances instead of classes
| * Use #model_name on instances instead of classesAmiel Martin2014-06-241-2/+2
| | | | | | | | | | | | This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class. Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8
* | Remove usafe of respond_to in ActionView testsJosé Valim2014-08-171-3/+1
| |
* | Properly assert for the expected messagesCarlos Antonio da Silva2014-07-301-4/+8
|/ | | | | | The message passed to Minitest's assert_raise is used as output in case the assertion fails, but we can test against the exact message by using the actual exception object that is returned from the assert_raise call.
* fix bad mergeAaron Patterson2014-05-121-15/+0
|
* add a test for the parameters sent to the url helper for new recordsAaron Patterson2014-05-121-0/+15
|
* add a test with three objectsAaron Patterson2014-05-121-2/+13
|
* add a test for passing two models to the polymorphic_url methodAaron Patterson2014-05-121-0/+8
|
* add tests for path based url_for callsAaron Patterson2014-05-081-2/+19
|
* don't manipulate the testclass, just add helpers to the instanceAaron Patterson2014-05-081-10/+11
|
* add a test for classes with optionsAaron Patterson2014-05-081-0/+7
|
* add tests for the polymorphic_path methodAaron Patterson2014-05-081-0/+3
|
* add more tests around the polymorphic url apiAaron Patterson2014-05-081-0/+12
|
* test for inconsistency between String and Symbol url_for handlingAaron Patterson2014-05-071-0/+4
|
* add tests for symbols passed to polymorphic_urlAaron Patterson2014-05-071-0/+12
|
* apparently passing a string to polymorphic_url is something we supportAaron Patterson2014-05-061-0/+12
| | | | o_O
* make sure url_for works similar to polymorphic_urlAaron Patterson2014-05-061-38/+43
|
* add a test for the parameters sent to the url helper for new recordsAaron Patterson2014-05-061-0/+15
|
* passing a nil in the polymorphic array is not supported. remove nils before ↵Aaron Patterson2014-05-021-4/+4
| | | | you call the method
* passing a nil should always raise an ArgumentErrorAaron Patterson2014-05-021-0/+25
|
* Remove wrapping div with inline styles for hidden form fields.Joost Baaij2014-04-141-4/+5
| | | | | | We are dropping HTML 4.01 and XHTML strict compliance since input tags directly inside a form are valid HTML5, and the absense of inline styles help in validating for Content Security Policy.
* Switched to use `display:none` in extra_tags_for_form method.Gaelian Ditchburn2014-01-051-1/+1
| | | | | | | | | | | | | The use of `display:inline` with the content_tag call in the extra_tags_for_form method potentially causes display issues with some browsers, namely Internet Explorer. IE's behaviour of not collapsing the line height on divs with ostensibly no content means that the automatically added div containing the hidden authenticity_token, utf8 and _method form input tags may interfere with other visible form elements in certain circumstances. The use of `display:none` rather than `display:inline` fixes this problem. Fixes #6403
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-204-0/+942