diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-04-26 18:49:19 +0300 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-12 05:39:14 +0300 |
commit | d4a919679a1eb5d3e2aaed4b920e6027d2482971 (patch) | |
tree | cdaaeb66e7de69a71994e08dd65478cab364fa24 /spec/support/db_cleaner.rb | |
parent | ecffca5d92353d55aaf8f984737fa617782310e0 (diff) |
Use transactions in JS feature specs
Uses Rails transactional tests instead of DatabaseCleaner
transaction strategy because that doesn't work with JS tests
Diffstat (limited to 'spec/support/db_cleaner.rb')
-rw-r--r-- | spec/support/db_cleaner.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/db_cleaner.rb b/spec/support/db_cleaner.rb index c69fa322073..08622dff6d9 100644 --- a/spec/support/db_cleaner.rb +++ b/spec/support/db_cleaner.rb @@ -1,4 +1,8 @@ module DbCleaner + def delete_from_all_tables!(except: nil) + DatabaseCleaner.clean_with(:deletion, cache_tables: false, except: except) + end + def deletion_except_tables [] end |