mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
FIX: Blocked watched words should apply to staff (#7547)
Having different behavior for staff and regular users can make it confusing for admins to understand how their configuration changes affect regular users
This commit is contained in:
@ -37,18 +37,14 @@ describe WatchedWord do
|
||||
should_block_post(manager)
|
||||
end
|
||||
|
||||
it "should not block the post from admin" do
|
||||
it "should block the post from admin" do
|
||||
manager = NewPostManager.new(admin, raw: "Want some #{block_word.word} for cheap?", topic_id: topic.id)
|
||||
result = manager.perform
|
||||
expect(result).to be_success
|
||||
expect(result.action).to eq(:create_post)
|
||||
should_block_post(manager)
|
||||
end
|
||||
|
||||
it "should not block the post from moderator" do
|
||||
it "should block the post from moderator" do
|
||||
manager = NewPostManager.new(moderator, raw: "Want some #{block_word.word} for cheap?", topic_id: topic.id)
|
||||
result = manager.perform
|
||||
expect(result).to be_success
|
||||
expect(result.action).to eq(:create_post)
|
||||
should_block_post(manager)
|
||||
end
|
||||
|
||||
it "should block in a private message too" do
|
||||
|
Reference in New Issue
Block a user