public function test_page_view_when_creator_is_deleted_but_owner_exists()
{
$page = Page::query()->first();
public function test_page_view_when_creator_is_deleted_but_owner_exists()
{
$page = Page::query()->first();
];
$resp = $this->post($book->getUrl("/draft/{$draft->id}"), $details);
$resp->assertRedirect();
$this->assertDatabaseHas('pages', [
'markdown' => $details['markdown'],
];
$resp = $this->post($book->getUrl("/draft/{$draft->id}"), $details);
$resp->assertRedirect();
$this->assertDatabaseHas('pages', [
'markdown' => $details['markdown'],
$movePageResp = $this->post($page->getUrl('/copy'), [
'entity_selection' => 'book:' . $newBook->id,
$movePageResp = $this->post($page->getUrl('/copy'), [
'entity_selection' => 'book:' . $newBook->id,
$this->asEditor()->post($page->getUrl('/copy'), [
'entity_selection' => 'book:' . $newBook->id,
$this->asEditor()->post($page->getUrl('/copy'), [
'entity_selection' => 'book:' . $newBook->id,
$resp->assertSee('Copy Page');
$movePageResp = $this->post($page->getUrl('/copy'), [
$resp->assertSee('Copy Page');
$movePageResp = $this->post($page->getUrl('/copy'), [
$movePageResp = $this->post($page->getUrl('/copy'), [
'entity_selection' => 'book:' . $newBook->id,
$movePageResp = $this->post($page->getUrl('/copy'), [
'entity_selection' => 'book:' . $newBook->id,
]);
$movePageResp->assertRedirect();
$this->assertDatabaseHas('pages', [
]);
$movePageResp->assertRedirect();
$this->assertDatabaseHas('pages', [
$this->assertDatabaseHas('pages', [
'markdown' => $details['markdown'],
$this->assertDatabaseHas('pages', [
'markdown' => $details['markdown'],