PERF: avoid checking for consecutive replies in test

This check can issue up to 2 queries per post created, we have specific
tests for it so we can avoid.

This also rolls back #4da6ca4d
This commit is contained in:
Sam Saffron
2019-05-09 13:28:28 +10:00
parent 8ec1f8cf07
commit 88650a1259
5 changed files with 67 additions and 71 deletions

View File

@@ -63,7 +63,7 @@ describe WatchedWord do
end
it "blocks on revisions" do
post = Fabricate(:post_with_validation, topic: Fabricate(:topic, user: tl2_user), user: tl2_user)
post = Fabricate(:post, topic: Fabricate(:topic, user: tl2_user), user: tl2_user)
expect {
PostRevisor.new(post).revise!(post.user, { raw: "Want some #{block_word.word} for cheap?" }, revised_at: post.updated_at + 10.seconds)
expect(post.errors).to be_present