mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
When restoring a backup, disable emails.
This prevents accidental sending of emails after a restore before the admin has had a chance to review everything.
This commit is contained in:
@ -151,10 +151,12 @@ describe Admin::BackupsController do
|
||||
describe ".restore" do
|
||||
|
||||
it "starts a restore" do
|
||||
expect(SiteSetting.disable_emails).to eq(false)
|
||||
BackupRestore.expects(:restore!).with(@admin.id, filename: backup_filename, publish_to_message_bus: true, client_id: "foo")
|
||||
|
||||
xhr :post, :restore, id: backup_filename, client_id: "foo"
|
||||
|
||||
expect(SiteSetting.disable_emails).to eq(true)
|
||||
expect(response).to be_success
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user