mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 20:45:35 +08:00
FIX: Do not log 'pull_hotlinked_images' edits in the staff action log
This commit is contained in:
@ -494,6 +494,19 @@ describe PostRevisor do
|
||||
expect(log.details).to eq("Hello world\n\n---\n\nlets totally update the body")
|
||||
end
|
||||
|
||||
it "doesn't log an edit when skip_staff_log is true" do
|
||||
subject.revise!(
|
||||
moderator,
|
||||
{ raw: "lets totally update the body" },
|
||||
skip_staff_log: true
|
||||
)
|
||||
log = UserHistory.where(
|
||||
acting_user_id: moderator.id,
|
||||
action: UserHistory.actions[:post_edit]
|
||||
).first
|
||||
expect(log).to be_blank
|
||||
end
|
||||
|
||||
it "doesn't log an edit when a staff member edits their own post" do
|
||||
revisor = PostRevisor.new(
|
||||
Fabricate(:post, user: moderator)
|
||||
|
Reference in New Issue
Block a user