aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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.
* | Introduce `ActionView::Template::Handlers::ERB.escape_whitelist`.Joost Baaij2012-11-161-1/+15
| | | | | | | | | | | | | | | | | | | | | | This is a list of mime types where template text is not html escaped by default. It prevents `Jack & Joe` from rendering as `Jack & Joe` for the whitelisted mime types. The default whitelist contains text/plain. This follows a whitelist approach where plain text templates are not escaped, and all the others (json, xml) are. The mime type is assumed to be set by the abstract controller.
* | Remove extra whitespaceSantiago Pastorino2012-11-151-1/+1
| |
* | Merge pull request #8112 from rails/encrypted_cookiesSantiago Pastorino2012-11-154-11/+38
|\ \ | | | | | | Encrypted cookies
| * | Move ensure_secret_secure to DummyKeyGeneratorSantiago Pastorino2012-11-031-1/+1
| | |
| * | Allow users to change the default salt if they want, shouldn't be necessarySantiago Pastorino2012-11-031-1/+4
| | |
| * | Use derived keys everywhere, http_authentication was missing itSantiago Pastorino2012-11-031-1/+3
| | |
| * | Add cookie.encrypted which returns an EncryptedCookieJarSantiago Pastorino2012-11-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | How to use it? cookies.encrypted[:discount] = 45 => Set-Cookie: discount=ZS9ZZ1R4cG1pcUJ1bm80anhQang3dz09LS1mbDZDSU5scGdOT3ltQ2dTdlhSdWpRPT0%3D--ab54663c9f4e3bc340c790d6d2b71e92f5b60315; path=/ cookies.encrypted[:discount] => 45
| * | Sign cookies using key deriverSantiago Pastorino2012-11-033-9/+16
| |/
* | Merge pull request #8222 from marcandre/avoid_slashRafael Mendonça França2012-11-141-0/+5
|\ \ | | | | | | Avoid using Integer#/, as it is redefined by the 'mathn' stdlib
| * | Avoid using Integer#/, as it is redefined by the 'mathn' stdlibMarc-Andre Lafortune2012-11-141-0/+5
| | |
* | | start using options objectAaron Patterson2012-11-131-1/+1
| | |
* | | Ruby 2.0.0 defaults source encoding to utf-8 so we need to specifically tag ↵Aaron Patterson2012-11-121-0/+1
|/ / | | | | | | this file with us-ascii
* | Revert "Merge pull request #8017 from jcoglan/objectless_sessions"Jon Leighton2012-11-091-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 36376560fdd02f955ae3bf6b7792b784443660ad, reversing changes made to 3148ed9a4bb7efef30b846dc945d73ceebcc3f0f. Conflicts: actionpack/lib/action_dispatch/middleware/flash.rb Reason: it broke Sam's CI https://github.com/rails/rails/pull/8017#issuecomment-10210655
* | Merge pull request #8017 from jcoglan/objectless_sessionsJon Leighton2012-11-081-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-031-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.
* | Merge pull request #8115 from senny/7842_handle_trailing_slash_with_enginesRafael Mendonça França2012-11-081-0/+5
|\ \ | | | | | | handle trailing slash with engines (test case for #7842)
| * | test case to lock down the behavior of #7842Yves Senn2012-11-041-0/+5
| |/
* | Test that permitted? is sticky on accessors, mutators, and mergesBenjamin Quorning2012-11-061-0/+24
| |
* | Test that not permitted is sticky on #exceptBenjamin Quorning2012-11-061-0/+1
| |
* | Current tests are testing stickiness of non-permitted parametersBenjamin Quorning2012-11-061-3/+3
| |
* | Fix buggy testsBenjamin Quorning2012-11-061-4/+4
| |
* | Add ensure block to make sure the state is properly restoredCarlos Antonio da Silva2012-11-041-1/+1
|/
* Support :multiple option on input tags with :indexDaniel Fox, Grant Hutchins & Trace Wax2012-11-021-0/+13
| | | | | When you have an explicit index set, then when you build an input tag with :multiple => true, it doesn't add [] to the end of its name, although it should.
* Add test to avoid regression of 1bfc5b4Rafael Mendonça França2012-11-021-0/+8
|
* Revert "Merge pull request #7668 from Draiken/fix_issue_6497"Rafael Mendonça França2012-11-021-7/+0
| | | | | | | | | | | | | | This reverts commit f4ad0ebe7a6b17658bddfeb996e3c34835b75623, reversing changes made to 8b2cbb3a832101f0e672ee309beca0f8c555b292. Conflicts: actionpack/CHANGELOG.md REASON: This added introduced a bug when you have a shorthand route inside a nested namespace. See https://github.com/rafaelfranca/rails/commit/281367eb770faf8077c1fd6194188e92ed1637a1
* Fix #8086 (BestStandardsSupport rewrites app X-UA-Compatible header, now ↵Nikita Afanasenko2012-11-011-0/+34
| | | | | | | appends). Now `BestStandardsSupport` middleware appends it's `X-UA-Compatible` value to app's value. Also test for `BestStandardsSupport` middleware added.
* Add test to ensure data attributes are properly escaped with tag helpersCarlos Antonio da Silva2012-11-011-2/+7
| | | | Closes #8091
* No need for the debuggerDavid Heinemeier Hansson2012-10-311-1/+0
|
* Allow #permit to take its list of permitted parameters as an arrayDavid Heinemeier Hansson2012-10-311-0/+5
|
* Revert "if format is unknown NullMimeTypeObject is returned"Guillermo Iguaran2012-10-311-11/+1
| | | | This reverts commit a8560fa361958b33d76e4468eb5c07d82a20196e.
* if format is unknown NullMimeTypeObject is returnedAngelo capilleri2012-10-311-1/+11
| | | | | | | | | | If a unknown format is passed in a request, the methods html?, xml?, json? ...etc Nil Exception. This patch add a class NullMimeTypeObject, that is returned when request.format is unknown and it responds false to the methods that ends with '?'. It refers to #7837, not fixes because it's not considered a improvement not a bug.
* Fix failing tests and use new hash style in deprecation messagesCarlos Antonio da Silva2012-10-292-12/+12
|
* Improve the deprecation message of link_to_function andRafael Mendonça França2012-10-271-6/+6
| | | | | | button_to_function Point the the Unobtrusive JavaScript secion in the JavaScript guide
* cleanup, remove trailing whitespace within actionpackYves Senn2012-10-279-15/+15
|
* give access to the original exception raised in case of a parse errorAaron Patterson2012-10-251-0/+14
|