discourse/spec/multisite/jobs_spec.rb
Martin Brennan 1cb6d36fef
FEATURE: Merge permanent upcoming changes with new features feed (#38526)
Instead of showing new feature feed items in the main list for admins,
we are going to show them in the "what's new" page, because then all
admins
even admins that haven't noticed the item being automatically enabled
will see them.

In addition, a linked PR for the new features feed plugin will
allow admins to override details for permanent upcoming changes,
or show them in different websites like releases.discourse.org 

* Merge new feature feed items with permanent upcoming changes,
taking into account if the items are already linked to an upcoming
change
* If a new feature feed item is linked to an upcoming change, but the
   site doesn't have that upcoming change or it's not in the permanent
   status, then exclude it from the new features feed
* Add filter option to UpcomingChanges::List to filter by specific
  status
* Add option to return the actual file path of the upcoming change
  image so a file reference can be created and an upload can be made
  from that
* Cache current status + datetime the status changed for every
   upcoming change, as well as all permanent upcoming changes,
   keyed to the git version

---------

Co-authored-by: Régis Hanol <regis@hanol.fr>
2026-03-25 07:52:31 +10:00

15 lines
542 B
Ruby

# frozen_string_literal: true
RSpec.describe "Running Sidekiq Jobs in Multisite", type: :multisite do
it "should revert back to the default connection" do
expect 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_response_json).returns([]).once
Jobs::CheckNewFeatures.new.perform({})
end
end