mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Move chewy enable for spec to search data manager (#38054)
This commit is contained in:
@@ -57,8 +57,6 @@ Sidekiq.default_configuration.logger = nil
|
||||
|
||||
DatabaseCleaner.strategy = [:deletion]
|
||||
|
||||
Chewy.settings[:enabled] = false
|
||||
|
||||
Devise::Test::ControllerHelpers.module_eval do
|
||||
alias_method :original_sign_in, :sign_in
|
||||
|
||||
|
||||
@@ -45,11 +45,14 @@ end
|
||||
RSpec.configure do |config|
|
||||
config.before :suite do
|
||||
if search_examples_present?
|
||||
Chewy.settings[:enabled] = true
|
||||
# Configure chewy to use `urgent` strategy to index documents
|
||||
Chewy.strategy(:urgent)
|
||||
|
||||
# Create search data
|
||||
search_data_manager.prepare_test_data
|
||||
else
|
||||
Chewy.settings[:enabled] = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user