DEV: Prevents rate limits for new feature checks on multisite (#12053)

This commit is contained in:
Penar Musaraj
2021-02-12 08:52:59 -05:00
committed by GitHub
parent 144584aacb
commit 900d4187ef
3 changed files with 15 additions and 4 deletions

View File

@ -8,4 +8,10 @@ RSpec.describe "Running Sidekiq Jobs in Multisite", type: :multisite do
Jobs::DestroyOldDeletionStubs.new.perform({})
end.to_not change { RailsMultisite::ConnectionManagement.current_db }
end
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
end