FEATURE: Display the reason for many reviewable items

Queued Posts and Users will now display a reason why they are in the
review queue.
This commit is contained in:
Robin Ward
2019-04-11 11:11:35 -04:00
parent 7143572e0c
commit 331a809738
13 changed files with 105 additions and 13 deletions
+3 -2
View File
@@ -801,7 +801,7 @@ describe PostsController do
expect(user).to be_silenced
rp = ReviewableQueuedPost.find_by(created_by: user)
expect(rp.payload['reason']).to eq('fast_typer')
expect(rp.reviewable_scores.first.reason).to eq('fast_typer')
mod = Fabricate(:moderator)
rp.perform(mod, :approve)
@@ -851,7 +851,8 @@ describe PostsController do
expect(parsed["action"]).to eq("enqueued")
reviewable = ReviewableQueuedPost.find_by(created_by: user)
expect(reviewable.payload['reason']).to eq('auto_silence_regex')
score = reviewable.reviewable_scores.first
expect(score.reason).to eq('auto_silence_regex')
user.reload
expect(user).to be_silenced