2019-04-29 20:27:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-09-10 22:15:06 -04:00
|
|
|
RSpec.describe "Running Sidekiq Jobs in Multisite", type: :multisite do
|
2017-10-11 05:17:03 -04:00
|
|
|
it 'should revert back to the default connection' do
|
2018-09-10 22:15:06 -04:00
|
|
|
expect do
|
|
|
|
Jobs::DestroyOldDeletionStubs.new.perform({})
|
|
|
|
end.to_not change { RailsMultisite::ConnectionManagement.current_db }
|
2017-10-11 05:17:03 -04:00
|
|
|
end
|
2021-02-12 08:52:59 -05:00
|
|
|
|
|
|
|
it 'CheckNewFeatures should only hit the payload once' do
|
|
|
|
# otherwise it will get rate-limited by meta
|
|
|
|
DiscourseUpdates.expects(:new_features_payload).returns("{}").once
|
|
|
|
Jobs::CheckNewFeatures.new.perform({})
|
|
|
|
end
|
2017-10-11 05:17:03 -04:00
|
|
|
end
|