FIX: When disagreeing with a flag that silenced a user, unsilence them

Previously it would unhide their post but leave them silenced.

This fix also cleans up some of the helper classes to make it easier
to pass extra data to the silencing code (for example, a link to the
post that caused the user to be silenced.)

This patch also refactors the auto_silence specs to avoid using
stubs.
This commit is contained in:
Robin Ward
2019-02-07 13:46:05 -05:00
parent 44d9bc12c9
commit bc3efab816
14 changed files with 186 additions and 174 deletions

View File

@ -2,7 +2,7 @@
require 'rails_helper'
describe SpamRulesEnforcer do
describe "spammers on same IP" do
let(:ip_address) { '182.189.119.174' }
let!(:spammer1) { Fabricate(:user, ip_address: ip_address) }