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:
parent
3f70e8bd2d
commit
29e5c20578
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue