2019-04-29 19:27:42 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-09-10 21:15:06 -05:00
|
|
|
RSpec.describe "Running Sidekiq Jobs in Multisite", type: :multisite do
|
2017-10-11 04:17:03 -05:00
|
|
|
it 'should revert back to the default connection' do
|
2018-09-10 21:15:06 -05:00
|
|
|
expect do
|
|
|
|
Jobs::DestroyOldDeletionStubs.new.perform({})
|
|
|
|
end.to_not change { RailsMultisite::ConnectionManagement.current_db }
|
2017-10-11 04:17:03 -05:00
|
|
|
end
|
2021-02-12 07:52:59 -06: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 04:17:03 -05:00
|
|
|
end
|