public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/ddollar/rails.git
Added fourth option to process in test cases to specify the content of the 
flash #949 [Jamis Buck]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1009 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Sat Mar 26 13:43:25 -0800 2005
commit  9fb6a54a164e7a1b64cf36efcba657c4215858b8
tree    7eefb985a625d09942ad73143fe1374dbe3392fc
parent  f569a14318e25005dfe27a51b3950c426581f18f
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* Added fourth option to process in test cases to specify the content of the flash #949 [Jamis Buck]
0
+
0
 * Added Verifications that allows you to specify preconditions to actions in form of statements like <tt>verify :only => :update_post, :params => "admin_privileges", :redirect_to => { :action => "settings" }</tt>, which ensure that the update_post action is only called if admin_privileges is available as a parameter -- otherwise the user is redirected to settings. #897 [Jamis Buck]
0
 
0
 * Fixed Form.Serialize for the JavascriptHelper to also seriliaze password fields #934 [dweitzman@gmail.com]
...
251
252
253
254
 
255
256
257
258
259
 
260
261
262
...
251
252
253
 
254
255
256
257
258
259
260
261
262
263
0
@@ -251,12 +251,13 @@ module Test
0
     class TestCase #:nodoc:
0
       private
0
         # execute the request and set/volley the response
0
- def process(action, parameters = nil, session = nil)
0
+ def process(action, parameters = nil, session = nil, flash = nil)
0
           @request.env['REQUEST_METHOD'] ||= "GET"
0
           @request.action = action.to_s
0
           @request.path_parameters = { :controller => @controller.class.controller_path }
0
           @request.parameters.update(parameters) unless parameters.nil?
0
           @request.session = ActionController::TestSession.new(session) unless session.nil?
0
+ @request.session["flash"] = ActionController::Flash::FlashHash.new.update(flash) if flash
0
           @controller.process(@request, @response)
0
         end
0
     

Comments

    No one has commented yet.