mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 06:18:14 +08:00
FIX: Make the 'Keep Message Deleted' reviewable option work (#32345)
When a flagged chat message has already been deleted, we offer an option in the review queue to agree with the flag and keep the message deleted. However, this option is currently broken due to a missing implementation for the option. Internal topic: t/152203.
This commit is contained in:
@ -19,6 +19,13 @@ RSpec.describe Chat::ReviewableMessage, type: :model do
|
||||
expect(chat_message.reload.deleted_at).not_to be_present
|
||||
end
|
||||
|
||||
it "agree_and_keep_deleted agrees with the flag and keeps the message deleted" do
|
||||
chat_message.trash!(user)
|
||||
reviewable.perform(moderator, :agree_and_keep_deleted)
|
||||
expect(reviewable).to be_approved
|
||||
expect(chat_message.reload.deleted_at).to be_present
|
||||
end
|
||||
|
||||
it "agree_and_delete agrees with the flag and deletes the message" do
|
||||
chat_message_id = chat_message.id
|
||||
reviewable.perform(moderator, :agree_and_delete)
|
||||
|
Reference in New Issue
Block a user