mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: show post approvals in Moderation History (#6643)
This commit is contained in:
parent
ee6c0170ce
commit
8e32aa1483
@ -10,7 +10,8 @@ class Admin::ModerationHistoryController < Admin::AdminController
|
||||
:suspend_user,
|
||||
:silence_user,
|
||||
:delete_post,
|
||||
:delete_topic
|
||||
:delete_topic,
|
||||
:post_approved,
|
||||
).values
|
||||
)
|
||||
|
||||
|
@ -3475,6 +3475,7 @@ en:
|
||||
silence_user: "User Silenced"
|
||||
delete_post: "Post Deleted"
|
||||
delete_topic: "Topic Deleted"
|
||||
post_approved: "Post Approved"
|
||||
|
||||
logs:
|
||||
title: "Logs"
|
||||
|
@ -35,6 +35,17 @@ RSpec.describe Admin::BackupsController do
|
||||
expect(::JSON.parse(response.body)['moderation_history']).to be_present
|
||||
end
|
||||
|
||||
it 'includes post approval record' do
|
||||
queued_post = Fabricate(:queued_post)
|
||||
post = queued_post.approve!(Discourse.system_user)
|
||||
|
||||
get "/admin/moderation_history.json?filter=post&post_id=#{post.id}"
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
|
||||
moderation_history = JSON.parse(response.body)['moderation_history'].first
|
||||
expect(moderation_history['action_name']).to eq('post_approved')
|
||||
end
|
||||
end
|
||||
|
||||
describe "for a topic" do
|
||||
|
Loading…
Reference in New Issue
Block a user