aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/test_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-06-30 14:49:36 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-06-30 14:49:36 +0000
commit524d1b5e044f8e104ac9b72290d832246c79bcd1 (patch)
tree9422c3ab06f6ed8b6c6ae2a11fbb1ba56aa9dcbf /actionpack/test/controller/test_test.rb
parent4cd5b05377c057ea44401dc759d641c5738540ce (diff)
downloadrails-524d1b5e044f8e104ac9b72290d832246c79bcd1.tar.gz
rails-524d1b5e044f8e104ac9b72290d832246c79bcd1.tar.bz2
rails-524d1b5e044f8e104ac9b72290d832246c79bcd1.zip
Uncommented request.recycle! as it breaks more than it fixes, left test case in, xal?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/test_test.rb')
-rw-r--r--actionpack/test/controller/test_test.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index 6a940ee2e4..996c3c6cc2 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -8,8 +8,8 @@ class TestTest < Test::Unit::TestCase
def test_params
render :text => params.inspect
- end
-
+ end
+
def test_uri
render :text => request.request_uri
end
@@ -33,6 +33,10 @@ class TestTest < Test::Unit::TestCase
</html>
HTML
end
+
+ def test_only_one_param
+ render :text => (@params[:left] && @params[:right]) ? "EEP, Both here!" : "OK"
+ end
end
def setup
@@ -49,8 +53,8 @@ HTML
def test_process_without_flash
process :set_flash
assert_flash_equal "><", "test"
- end
-
+ end
+
def test_process_with_flash
process :set_flash, nil, nil, { "test" => "value" }
assert_flash_equal ">value<", "test"
@@ -70,6 +74,13 @@ HTML
@request.set_REQUEST_URI "/explicit/uri"
process :test_uri, :id => 7
assert_equal "/explicit/uri", @response.body
+ end
+
+ def test_multiple_calls
+ process :test_only_one_param, :left => true
+ assert_equal "OK", @response.body
+ process :test_only_one_param, :right => true
+ assert_equal "OK", @response.body
end
def test_assert_tag