1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Fixed page includes erroring on save

Closes #514
This commit is contained in:
Dan Brown
2017-09-20 21:03:40 +01:00
parent df0a982433
commit 74a5e3113e
3 changed files with 19 additions and 3 deletions

View File

@ -35,6 +35,21 @@ class PageContentTest extends TestCase
$pageContent->assertSee('Well This is a second block of content');
}
public function test_saving_page_with_includes()
{
$page = Page::first();
$secondPage = Page::all()->get(2);
$this->asEditor();
$page->html = "<p>{{@$secondPage->id}}</p>";
$resp = $this->put($page->getUrl(), ['name' => $page->name, 'html' => $page->html, 'summary' => '']);
$resp->assertStatus(302);
$page = Page::find($page->id);
$this->assertContains("{{@$secondPage->id}}", $page->html);
}
public function test_page_revision_views_viewable()
{
$this->asEditor();