DEV: Don't cache watched words in test env (#16731)

The cache was causing state to leak between tests since the `WatchedWord` record in the DB would have been rolled back but `WordWatcher` still had the word in the cache.
This commit is contained in:
Alan Guo Xiang Tan
2022-05-12 14:45:05 +08:00
committed by GitHub
parent 8e9164fb60
commit fd1dc91eed
3 changed files with 22 additions and 3 deletions

View File

@@ -520,11 +520,12 @@ describe Report do
before do
freeze_time
PostActionCreator.new(flagger, post, PostActionType.types[:spam], message: 'bad').perform
end
it "returns a report with data" do
result = PostActionCreator.new(flagger, post, PostActionType.types[:spam], message: 'bad').perform
expect(result.success).to eq(true)
expect(report.data).to be_present
row = report.data[0]