1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Kasper Timm Hansen 2016-02-12 22:15:15 +01:00
parent 3f70e8bd2d
commit 29e5c20578

View file

@ -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