mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 04:38:47 +08:00
DEV: Remove enable_whispers site setting (#19196)
* DEV: Remove enable_whispers site setting Whispers are enabled as long as there is at least one group allowed to whisper, see whispers_allowed_groups site setting. * DEV: Always enable whispers for admins if at least one group is allowed.
This commit is contained in:
@ -119,19 +119,19 @@ RSpec.describe BookmarkQuery do
|
||||
context "for a whispered post" do
|
||||
before do
|
||||
post_bookmark.bookmarkable.update(post_type: Post.types[:whisper])
|
||||
SiteSetting.enable_whispers = true
|
||||
SiteSetting.whispers_allowed_groups = "#{Group::AUTO_GROUPS[:staff]}"
|
||||
end
|
||||
fab!(:whisperers_group) { Fabricate(:group) }
|
||||
|
||||
context "when the user is moderator" do
|
||||
it "does return the whispered post" do
|
||||
user.update!(moderator: true)
|
||||
user.grant_moderation!
|
||||
expect(bookmark_query.list_all.count).to eq(3)
|
||||
end
|
||||
end
|
||||
context "when the user is admin" do
|
||||
it "does return the whispered post" do
|
||||
user.update!(admin: true)
|
||||
user.grant_admin!
|
||||
expect(bookmark_query.list_all.count).to eq(3)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user