aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/flash_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* improve error message when include assertions failMichael Grosser2016-09-161-1/+1
| | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
* Include the content of the flash in the auto-generated etag (#26250)David Heinemeier Hansson2016-08-221-0/+29
| | | Include the content of the flash in the auto-generated etag
* Add three new rubocop rulesRafael Mendonça França2016-08-161-4/+4
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* modernizes hash syntax in actionpackXavier Noria2016-08-061-18/+18
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-21/+21
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Deprecate :controller and :action path parametersAndrew White2016-03-011-1/+3
| | | | | | | | Allowing :controller and :action values to be specified via the path in config/routes.rb has been an underlying cause of a number of issues in Rails that have resulted in security releases. In light of this it's better that controllers and actions are explicitly whitelisted rather than trying to blacklist or sanitize 'bad' values.
* finish deprecating handling strings and symbolsAaron Patterson2015-08-071-1/+1
| | | | | since we only work with instances of classes, it greatly simplifies the `Middleware` implementation.
* Remove `assigns` and `assert_template`.Guo Xiang Tan2015-05-301-24/+25
|
* Deprecate `:nothing` option for render methodMehmet Emin İNAÇ2015-05-281-1/+1
| | | | `head` method works similar to `render` method with `:nothing` option
* Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-291-7/+9
| | | | | | | | Non-kwargs requests are deprecated now. Guides are updated as well. `post url, nil, nil, { a: 'b' }` doesn't make sense. `post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
* Remove unused `subclass_controller_with_flash_type_bar` var from flash test.Vipul A M2014-04-071-2/+2
|
* Fix setup of adding _flash_types test.Guo Xiang Tan2014-04-061-6/+15
| | | | | | | Adding flash types to a controller within any of the tests will result in a global state change of the controller under test. This patch will prevent state leaks and allow us to run the test in random order.
* Fixed broken flash testsGodfrey Chan2014-02-111-4/+4
|
* Typo fixes [ci skip]Akshay Vishnoi2013-11-301-2/+2
|
* Custom flash should be defined only for the class that defines it and it's ↵Ricardo de Cillo2013-09-131-0/+12
| | | | subclasses.
* Remove comments about removing LegacyKeyGenerator in 4.1Trevor Turk2013-04-031-1/+0
|
* Rename DummyKeyGenerator -> LegacyKeyGeneratorTrevor Turk2013-04-021-2/+2
|
* use `_action` instead of `_filter` callbacksFrancesco Rodriguez2012-12-071-3/+3
|
* Remove extra whitespaceSantiago Pastorino2012-11-151-1/+1
|
* Sign cookies using key deriverSantiago Pastorino2012-11-031-2/+4
|
* Use "instance_accessor" for flash types class attributeCarlos Antonio da Silva2012-07-071-1/+0
|
* Added support add_flash_typeskennyj2012-07-071-0/+26
|
* Remove unused code.kennyj2012-07-071-4/+0
|
* Remove default match without specified methodJose and Yehuda2012-04-241-1/+1
| | | | | | | | | | | | | | | | In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964
* Remove rescue_action from compatibility module and testsCarlos Antonio da Silva2012-01-171-4/+0
|
* Get rid of the close checks since we cannot reliably close the session anyway.José Valim2011-12-161-40/+0
|
* Don't reuse a closed flash when using nowFlorent Piteau2011-04-201-0/+8
|
* Be sure to not store the closed flash in the session.José Valim2011-04-191-1/+8
|
* favor composition over inheritance, have FlashHash delegate to a HashAaron Patterson2011-04-061-4/+4
|
* raise if someone tries to modify the flash when it was already streamed back ↵Santiago Pastorino2011-04-051-0/+50
| | | | to the client or converted to HTTP headers
* Remove deprecated stuff in ActionControllerCarlos Antonio da Silva2010-09-261-1/+1
| | | | | | This removes all deprecated classes in ActionController related to Routing, Abstract Request/Response and Integration/IntegrationTest. All tests and docs were changed to ActionDispatch instead of ActionController.
* Removed deprecated RouteSet API, still many tests failPiotr Sarnacki2010-09-051-1/+1
|
* Just reading flash messages should not create a session if one does not ↵José Valim2010-06-251-3/+17
| | | | exist yet.
* Ruby 1.9.1 compat: constant lookupJeremy Kemper2010-06-111-1/+1
|
* Simplify cookie_store by simply relying on cookies.signed.José Valim2010-05-181-1/+10
|
* Add tests for convenience methods #notice and #alert to flash.now [#4369 ↵Anil Wadghule2010-05-151-0/+20
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Module lookup issue on flash_test using ruby 1.9 solved [#3716 status:resolved]Sam Elliott and Santiago Pastorino2010-01-171-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move Flash into middlewareJoshua Peek2010-01-151-2/+40
|
* reset_session needs to be a real method so flash can override itJoshua Peek2009-12-211-12/+12
|
* Added alert/notice from 2-3-stable and refactored redirect_to into just ↵David Heinemeier Hansson2009-12-171-1/+28
| | | | living in Redirector [DHH]
* The FlashHash and friends causes a lot of needless session storing, when we ↵Johan Sörensen2009-05-281-1/+6
| | | | | | know for a fact that there's no content in the flash. By not storing the empty hash in the session we save a lot of communication with the various session backends, while still keeping the same interface to the flash. [#2703 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* ActionController::Flash::FlashHash.use now returns either the value ↵Niels Ganser2009-05-271-0/+15
| | | | | | corresponding to the passed key or itself when no key is passed [#1792 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Make ActionController::Flash work with new_basePratik Naik2009-05-211-24/+25
|
* Deprecate template, session, assigns, and layout accessors on response ↵Joshua Peek2009-04-281-24/+24
| | | | object. Instead access them through the controller instance. This mainly affects functional test assertions.
* Include process methods in ActionController::TestCase only. No need to ↵Jeremy Kemper2009-01-071-6/+2
| | | | alias_method_chain :process either.
* Move missing template logic to ActionViewPratik Naik2008-04-191-1/+1
|
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove unnecessary returns from builtin filters since render/return is now ↵Jeremy Kemper2007-10-241-1/+0
| | | | | | sufficient. Closes #9952 [Josh Peek] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed ActionController::Base#keep_flash (use flash.keep instead)David Heinemeier Hansson2007-09-091-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7428 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sweep flash when filter chain is halted. Closes #6175. [Caio Chassot ↵Marcel Molina2007-05-061-0/+45
| | | | | | <lists@v2studio.com>] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de