mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Introduce enable_new_notifications_menu site setting (#19860)
The `enable_new_notifications_menu` site setting allows sites that have `navigation_menu` set to `legacy` to use the redesigned notifications menu before switching to the new sidebar navigation menu.
This commit is contained in:
committed by
GitHub
parent
9ed4550b86
commit
f72875c729
@@ -0,0 +1,18 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe EnableNewNotificationsMenuValidator do
|
||||
it "does not allow `enable_new_notifications_menu` site settings to be enabled when `navigation_menu` site settings is not set to `legacy`" do
|
||||
SiteSetting.navigation_menu = "sidebar"
|
||||
|
||||
expect { SiteSetting.enable_new_notifications_menu = true }.to raise_error(
|
||||
Discourse::InvalidParameters,
|
||||
/#{I18n.t("site_settings.errors.enable_new_notifications_menu_not_legacy_navigation_menu")}/,
|
||||
)
|
||||
end
|
||||
|
||||
it "allows `enable_new_notifications_menu` site settings to be enabled when `navigation_menu` site settings is set to `legacy`" do
|
||||
SiteSetting.navigation_menu = "legacy"
|
||||
|
||||
expect { SiteSetting.enable_new_notifications_menu = true }.to_not raise_error
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user