mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add notify_mods_when_user_blocked site setting to control whether moderators get a message when someone is automatically blocked
This commit is contained in:
@@ -128,6 +128,12 @@ describe SpamRulesEnforcer do
|
||||
end
|
||||
subject.punish_user
|
||||
end
|
||||
|
||||
it "doesn't send a pm to moderators if notify_mods_when_user_blocked is false" do
|
||||
SiteSetting.stubs(:notify_mods_when_user_blocked).returns(false)
|
||||
GroupMessage.expects(:create).never
|
||||
subject.punish_user
|
||||
end
|
||||
end
|
||||
|
||||
context 'user is already blocked' do
|
||||
|
||||
Reference in New Issue
Block a user