FIX: more flaky jobs_base_spec.rb (#8259)
This commit is follow up of 417be323a2
We need more steps to properly switch from multi-site to single-site
This commit is contained in:
parent
1531644288
commit
c5bcad10a6
|
@ -111,8 +111,10 @@ xdescribe BackupRestore::Restorer do
|
||||||
described_class.any_instance.stubs(initialize_state: true)
|
described_class.any_instance.stubs(initialize_state: true)
|
||||||
end
|
end
|
||||||
after do
|
after do
|
||||||
|
ActiveRecord::Base.clear_all_connections!
|
||||||
|
Rails.configuration.multisite = false
|
||||||
RailsMultisite::ConnectionManagement.clear_settings!
|
RailsMultisite::ConnectionManagement.clear_settings!
|
||||||
conn.establish_connection(db: 'default')
|
ActiveRecord::Base.establish_connection
|
||||||
end
|
end
|
||||||
let(:conn) { RailsMultisite::ConnectionManagement }
|
let(:conn) { RailsMultisite::ConnectionManagement }
|
||||||
let(:restorer) { described_class.new(admin.id) }
|
let(:restorer) { described_class.new(admin.id) }
|
||||||
|
|
Loading…
Reference in New Issue