DEV: change testing cache clearing so it is more deliberate

This test is flaky, this changes it so we always start tests with a clean
cache (concurrency and redis delays pending)
This commit is contained in:
Sam Saffron 2019-06-03 10:21:38 +10:00
parent f415712269
commit bb8dfb124e
1 changed files with 5 additions and 1 deletions

View File

@ -14,8 +14,12 @@ describe WatchedWord do
let(:flag_word) { Fabricate(:watched_word, action: WatchedWord.actions[:flag]) }
let(:block_word) { Fabricate(:watched_word, action: WatchedWord.actions[:block]) }
before_all do
WordWatcher.clear_cache!
end
after do
$redis.flushall
WordWatcher.clear_cache!
end
context "block" do