mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-01-03 23:42:28 +03:00
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Entity;
|
||||
|
||||
use BookStack\Actions\ActivityType;
|
||||
use BookStack\Entities\Models\Page;
|
||||
use BookStack\Entities\Repos\PageRepo;
|
||||
use Tests\TestCase;
|
||||
@@ -117,6 +118,9 @@ class PageRevisionTest extends TestCase
|
||||
'type' => 'version',
|
||||
'summary' => "Restored from #{$revToRestore->id}; My first update",
|
||||
]);
|
||||
|
||||
$detail = "Revision #{$revToRestore->revision_number} (ID: {$revToRestore->id}) for page ID {$revToRestore->page_id}";
|
||||
$this->assertActivityExists(ActivityType::REVISION_RESTORE, null, $detail);
|
||||
}
|
||||
|
||||
public function test_page_revision_count_increments_on_update()
|
||||
@@ -164,6 +168,9 @@ class PageRevisionTest extends TestCase
|
||||
|
||||
$this->assertTrue($beforeRevisionCount === ($afterRevisionCount + 1));
|
||||
|
||||
$detail = "Revision #{$revision->revision_number} (ID: {$revision->id}) for page ID {$revision->page_id}";
|
||||
$this->assertActivityExists(ActivityType::REVISION_DELETE, null, $detail);
|
||||
|
||||
// Try to delete the latest revision
|
||||
$beforeRevisionCount = $page->revisions->count();
|
||||
$resp = $this->asEditor()->delete($page->currentRevision->getUrl('/delete/'));
|
||||
|
||||
Reference in New Issue
Block a user