A platform for community discussion. Free, open, simple.
FIX: clear WordWatcher cache after topic_spec (#11488)
Krzysztof Kotlarek86a8070fd798
diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rbindex 8ccac8ac3db..be424d46f9c 100644--- a/spec/models/topic_spec.rb+++ b/spec/models/topic_spec.rb@@ -37,6 +37,10 @@ describe Topic doenddescribe 'when title contains censored words' do+ after do+ WordWatcher.clear_cache!+ end+it 'should not be valid' do['pineapple', 'pen'].each { |w| Fabricate(:watched_word, word: w, action: WatchedWord.actions[:censor]) }@@ -88,6 +92,10 @@ describe Topic dodescribe 'blocked words' dodescribe 'when title contains watched words' do+ after do+ WordWatcher.clear_cache!+ end+it 'should not be valid' doFabricate(:watched_word, word: 'pineapple', action: WatchedWord.actions[:block])