]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/PageContentTest.php
Finished migration of last angular code
[bookstack] / tests / Entity / PageContentTest.php
index 6b64c2c640ef8427f72322ae489b9508636bf44e..cd6526aecb1758bb530b69a3b9a6a26d53b522c6 100644 (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();