aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-02-12 22:15:15 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-02-12 22:15:15 +0100
commit29e5c2057808c3c32ddf0d2b3d99224037d15a62 (patch)
tree4a54a39c6488535186dcaf4c8a84b7cec4b26451 /actionpack/test/controller
parent3f70e8bd2dd9d172cd0cc5d22147f3e2a8eb5c3e (diff)
downloadrails-29e5c2057808c3c32ddf0d2b3d99224037d15a62.tar.gz
rails-29e5c2057808c3c32ddf0d2b3d99224037d15a62.tar.bz2
rails-29e5c2057808c3c32ddf0d2b3d99224037d15a62.zip
Check `partial_rendered_times` to clarify expectations.
It was difficult to see when the partials were rendered, and how many times we expected it to be rendered before. Because we weren't explaining it.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/caching_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index a1785d9ab1..2de716aa00 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -417,8 +417,11 @@ class AutomaticCollectionCacheTest < ActionController::TestCase
def test_preserves_order_when_reading_from_cache_plus_rendering
get :index, params: { id: 2 }
- get :index_ordered
+ assert_equal 1, @controller.partial_rendered_times
+ assert_select ':root', 'david, 2'
+ get :index_ordered
+ assert_equal 3, @controller.partial_rendered_times
assert_select ':root', "david, 1\n david, 2\n david, 3"
end