diff options
author | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2017-03-01 20:39:29 +0900 |
---|---|---|
committer | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2017-03-03 19:36:56 +0900 |
commit | 5edbdca5c0db00b0724bc0c9202c83194b688ae8 (patch) | |
tree | c8f6bcc7bfd6f8c57a529ca931e8fd72f98d8823 /actionpack/lib/action_dispatch/system_testing/test_helpers | |
parent | e1a72fef7de9a5c0871b0ef1a4acb9483d2bf1f3 (diff) | |
download | rails-5edbdca5c0db00b0724bc0c9202c83194b688ae8.tar.gz rails-5edbdca5c0db00b0724bc0c9202c83194b688ae8.tar.bz2 rails-5edbdca5c0db00b0724bc0c9202c83194b688ae8.zip |
Fix random failure on system test with ajax
If application has ajax, browser may begin request after rollback.
`teardown_fixtures` will be called after `super` on `after_teardown`
so we must call `Capybara.reset_sessions!` before `super`
https://github.com/rails/rails/blob/b61a56541aecd7ac685d4f19d943177a3f1b465a/activerecord/lib/active_record/fixtures.rb#L857
Diffstat (limited to 'actionpack/lib/action_dispatch/system_testing/test_helpers')
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb index 1c89bfacfa..187ba2cc5f 100644 --- a/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb +++ b/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb @@ -11,8 +11,8 @@ module ActionDispatch def after_teardown take_failed_screenshot - super Capybara.reset_sessions! + super end end end |