aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/test_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-26 21:43:25 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-26 21:43:25 +0000
commit9fb6a54a164e7a1b64cf36efcba657c4215858b8 (patch)
tree7eefb985a625d09942ad73143fe1374dbe3392fc /actionpack/test/controller/test_test.rb
parentf569a14318e25005dfe27a51b3950c426581f18f (diff)
downloadrails-9fb6a54a164e7a1b64cf36efcba657c4215858b8.tar.gz
rails-9fb6a54a164e7a1b64cf36efcba657c4215858b8.tar.bz2
rails-9fb6a54a164e7a1b64cf36efcba657c4215858b8.zip
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
Diffstat (limited to 'actionpack/test/controller/test_test.rb')
-rw-r--r--actionpack/test/controller/test_test.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
new file mode 100644
index 0000000000..28d64c6043
--- /dev/null
+++ b/actionpack/test/controller/test_test.rb
@@ -0,0 +1,25 @@
+require File.dirname(__FILE__) + '/../abstract_unit'
+
+class TestTest < Test::Unit::TestCase
+ class TestController < ActionController::Base
+ def set_flash
+ flash["test"] = ">#{flash["test"]}<"
+ end
+ end
+
+ def setup
+ @controller = TestController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ end
+
+ def test_process_without_flash
+ process :set_flash
+ assert_flash_equal "><", "test"
+ end
+
+ def test_process_with_flash
+ process :set_flash, nil, nil, { "test" => "value" }
+ assert_flash_equal ">value<", "test"
+ end
+end