mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Fixed item export with deleted creator/updated
Added test to cover. Fixes #2733
This commit is contained in:
@ -230,4 +230,21 @@ class ExportTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function test_page_export_with_deleted_creator_and_updater()
|
||||
{
|
||||
$user = $this->getViewer(['name' => 'ExportWizardTheFifth']);
|
||||
$page = Page::first();
|
||||
$page->created_by = $user->id;
|
||||
$page->updated_by = $user->id;
|
||||
$page->save();
|
||||
|
||||
$resp = $this->asEditor()->get($page->getUrl('/export/html'));
|
||||
$resp->assertSee('ExportWizardTheFifth');
|
||||
|
||||
$user->delete();
|
||||
$resp = $this->get($page->getUrl('/export/html'));
|
||||
$resp->assertStatus(200);
|
||||
$resp->assertDontSee('ExportWizardTheFifth');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user