Skip to content

Commit dc65a90

Browse files
author
William Meleyal
committed
add test for history.back / cached page
1 parent fa925f5 commit dc65a90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/view_helper_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ class ViewHelperTest < ActionDispatch::IntegrationTest
5858
page.click_link('Bob')
5959
assert page.has_content?('Hello Bob')
6060

61+
# Try going back.
62+
page.execute_script('history.back();')
63+
assert page.has_content?('Hello Alice')
64+
6165
# Try Turbolinks javascript API.
6266
page.execute_script('Turbolinks.visit("/pages/2");')
6367
assert page.has_content?('Hello Alice')

0 commit comments

Comments
 (0)