1
0
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:
Dan Brown
2021-05-05 22:52:08 +01:00
parent 95798a2eba
commit a083ceaf44
2 changed files with 19 additions and 2 deletions

View File

@ -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');
}
}