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

@ -1082,6 +1082,10 @@ describe Topic do
end
context 'archived' do
it 'should create a staff action log entry' do
expect { topic.update_status('archived', true, @user) }.to change { UserHistory.where(action: UserHistory.actions[:topic_archived]).count }.by(1)
end
context 'disable' do
before do
@archived_topic = Fabricate(:topic, archived: true, bumped_at: 1.hour.ago)
@ -1155,6 +1159,10 @@ describe Topic do
expect { topic.update_status(status, true, @user) }.to change(topic.group_archived_messages, :count).by(1)
end
it 'should create a staff action log entry' do
expect { topic.update_status(status, true, @user) }.to change { UserHistory.where(action: UserHistory.actions[:topic_closed]).count }.by(1)
end
end
context 'autoclosed' do