FIX: Do not log 'pull_hotlinked_images' edits in the staff action log

This commit is contained in:
David Taylor
2019-09-12 15:55:45 +01:00
parent e4b813df4c
commit 67a98946b8
4 changed files with 18 additions and 3 deletions

View File

@ -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)