aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r--actionpack/test/controller/render_test.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 2f3997518f..52049f2a8a 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -547,6 +547,10 @@ class TestController < ActionController::Base
render :partial => "customer_counter", :collection => [ Customer.new("david"), Customer.new("mary") ]
end
+ def partial_collection_with_as_and_counter
+ render :partial => "customer_counter_with_as", :collection => [ Customer.new("david"), Customer.new("mary") ], :as => :client
+ end
+
def partial_collection_with_locals
render :partial => "customer_greeting", :collection => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" }
end
@@ -1242,6 +1246,11 @@ class RenderTest < ActionController::TestCase
assert_equal "david0mary1", @response.body
end
+ def test_partial_collection_with_as_and_counter
+ get :partial_collection_with_as_and_counter
+ assert_equal "david0mary1", @response.body
+ end
+
def test_partial_collection_with_locals
get :partial_collection_with_locals
assert_equal "Bonjour: davidBonjour: mary", @response.body
@@ -1379,7 +1388,7 @@ class EtagRenderTest < ActionController::TestCase
def test_render_against_etag_request_should_have_no_content_length_when_match
@request.if_none_match = etag_for("hello david")
get :render_hello_world_from_variable
- assert !@response.headers.has_key?("Content-Length"), @response.headers['Content-Length']
+ assert !@response.headers.has_key?("Content-Length")
end
def test_render_against_etag_request_should_200_when_no_match
@@ -1515,4 +1524,4 @@ class LastModifiedRenderTest < ActionController::TestCase
get :conditional_hello_with_bangs
assert_response :success
end
-end \ No newline at end of file
+end