aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-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