Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-04-26 18:49:19 +0300
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-07-12 05:39:14 +0300
commitd4a919679a1eb5d3e2aaed4b920e6027d2482971 (patch)
treecdaaeb66e7de69a71994e08dd65478cab364fa24 /spec/support/db_cleaner.rb
parentecffca5d92353d55aaf8f984737fa617782310e0 (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.rb4
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