Add spec to confirm auto hide is not executed on like

This commit is contained in:
Robin Ward 2019-09-18 09:51:07 -04:00
parent 7ae071282a
commit 0b921d2356
1 changed files with 13 additions and 0 deletions

View File

@ -545,6 +545,19 @@ describe PostAction do
expect(post.hidden_at).to be_present
end
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' do
post = create_post
walterwhite = Fabricate(:walter_white)