A platform for community discussion. Free, open, simple.
Add spec to confirm auto hide is not executed on like
Robin Ward0b921d235643
diff --git a/spec/models/post_action_spec.rb b/spec/models/post_action_spec.rbindex 80ff626e6c3..4f477e02c0b 100644--- a/spec/models/post_action_spec.rb+++ b/spec/models/post_action_spec.rb@@ -545,6 +545,19 @@ describe PostAction doexpect(post.hidden_at).to be_presentend+ it "will not trigger auto hide on like" do+ mod = Fabricate(:moderator)+ post = Fabricate(:post, user: mod)++ result = PostActionCreator.spam(eviltrout, post)+ result.reviewable.update!(score: 1000.0)+ PostActionCreator.like(Fabricate(:admin), post)++ post.reload++ expect(post.hidden).to eq(false)+ end+it 'should follow the rules for automatic hiding workflow' dopost = create_postwalterwhite = Fabricate(:walter_white)