mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FEATURE: Create logs for Group Moderator changes (#10271)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user