Bug fix for assert_template when opening a new session.

See https://github.com/rails/rails/pull/16234#commitcomment-7115670.
Improve description of tests.
Merge pull request #16272 from tgxworld/fix_template_assertion_when_opening_a_session

Fix template assertion when opening a session.