mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 15:31:11 +08:00
display/preload the logs of the last/current operation
This commit is contained in:
@ -16,13 +16,16 @@ describe Admin::BackupsController do
|
||||
|
||||
context "html format" do
|
||||
|
||||
it "preloads both backups and operations_status" do
|
||||
it "preloads important data" do
|
||||
Backup.expects(:all).returns([])
|
||||
subject.expects(:store_preloaded).with("backups", "[]")
|
||||
|
||||
BackupRestore.expects(:operations_status).returns({})
|
||||
subject.expects(:store_preloaded).with("operations_status", "{}")
|
||||
|
||||
BackupRestore.expects(:logs).returns([])
|
||||
subject.expects(:store_preloaded).with("logs", "[]")
|
||||
|
||||
xhr :get, :index, format: :html
|
||||
|
||||
response.should be_success
|
||||
@ -134,15 +137,17 @@ describe Admin::BackupsController do
|
||||
|
||||
describe ".logs" do
|
||||
|
||||
it "preloads operations_status" do
|
||||
it "preloads important data" do
|
||||
BackupRestore.expects(:operations_status).returns({})
|
||||
subject.expects(:store_preloaded).with("operations_status", "{}")
|
||||
|
||||
BackupRestore.expects(:logs).returns([])
|
||||
subject.expects(:store_preloaded).with("logs", "[]")
|
||||
|
||||
xhr :get, :logs, format: :html
|
||||
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe ".restore" do
|
||||
|
Reference in New Issue
Block a user