mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Ensure reviewable counts are updated correctly for new user menu (#21222)
On the client-side, message-bus subscriptions and reviewable count UI is based on the 'redesigned_user_menu_enabled' boolean. We need to use the same logic on the server-side to ensure things work correctly when legacy navigation is used alongside the new user menu.
This commit is contained in:
@@ -85,6 +85,7 @@ RSpec.describe Jobs::NotifyReviewable do
|
||||
|
||||
it "will notify users of new reviewable content for the old user menu" do
|
||||
SiteSetting.navigation_menu = "legacy"
|
||||
SiteSetting.enable_new_notifications_menu = false
|
||||
SiteSetting.enable_category_group_moderation = true
|
||||
|
||||
GroupUser.create!(group_id: group.id, user_id: moderator.id)
|
||||
@@ -170,6 +171,7 @@ RSpec.describe Jobs::NotifyReviewable do
|
||||
|
||||
it "respects priority" do
|
||||
SiteSetting.navigation_menu = "legacy"
|
||||
SiteSetting.enable_new_notifications_menu = false
|
||||
SiteSetting.enable_category_group_moderation = true
|
||||
Reviewable.set_priorities(medium: 2.0)
|
||||
SiteSetting.reviewable_default_visibility = "medium"
|
||||
@@ -224,6 +226,8 @@ RSpec.describe Jobs::NotifyReviewable do
|
||||
end
|
||||
|
||||
it "skips sending notifications if user_ids is empty" do
|
||||
SiteSetting.navigation_menu = "legacy"
|
||||
SiteSetting.enable_new_notifications_menu = false
|
||||
reviewable = Fabricate(:reviewable, reviewable_by_moderator: true)
|
||||
regular_user = Fabricate(:user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user