mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 16:24:17 +08:00
f331d2603d
This refactors it so "Defaults provider" is only responsible for "defaults" Locale handling and management of locale settings is moved back into SiteSettingExtension This eliminates complex state management using DistributedCache and makes it way easier to test SiteSettingExtension
24 lines
545 B
Ruby
24 lines
545 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe "Running Sidekiq Jobs in Multisite" do
|
|
let(:conn) { RailsMultisite::ConnectionManagement }
|
|
|
|
before do
|
|
conn.config_filename = "spec/fixtures/multisite/two_dbs.yml"
|
|
end
|
|
|
|
after do
|
|
conn.clear_settings!
|
|
end
|
|
|
|
it 'should revert back to the default connection' do
|
|
expect(RailsMultisite::ConnectionManagement.current_db)
|
|
.to eq('default')
|
|
|
|
Jobs::DestroyOldDeletionStubs.new.perform({})
|
|
|
|
expect(RailsMultisite::ConnectionManagement.current_db)
|
|
.to eq('default')
|
|
end
|
|
end
|