FEATURE: Create logs for Group Moderator changes (#10271)

This commit is contained in:
jbrw
2020-07-21 14:29:02 -04:00
committed by GitHub
parent 549c552402
commit 0ed784b4fc
10 changed files with 135 additions and 2 deletions

View File

@ -1805,6 +1805,7 @@ describe PostsController do
expect(public_post.custom_fields[Post::NOTICE_TYPE]).to eq(Post.notices[:custom])
expect(public_post.custom_fields[Post::NOTICE_ARGS]).to include('<p>Hello <em>world</em>!</p>')
expect(public_post.custom_fields[Post::NOTICE_ARGS]).not_to include('onebox')
expect(UserHistory.where(action: UserHistory.actions[:post_staff_note_create]).count).to eq(1)
put "/posts/#{public_post.id}/notice.json", params: { notice: nil }
@ -1812,6 +1813,7 @@ describe PostsController do
public_post.reload
expect(public_post.custom_fields[Post::NOTICE_TYPE]).to eq(nil)
expect(public_post.custom_fields[Post::NOTICE_ARGS]).to eq(nil)
expect(UserHistory.where(action: UserHistory.actions[:post_staff_note_destroy]).count).to eq(1)
end
describe 'group moderators' do