]> BookStack Code Mirror - bookstack/blobdiff - tests/Settings/CustomHeadContentTest.php
Aligned some editor events, Changed wysiwyg custom styles loading
[bookstack] / tests / Settings / CustomHeadContentTest.php
index 36c8a4c0fcc68f283cfcbf08fd8bb33bff6df582..eeeab3f45a062c023fa7a89ad8c6b1f56e049701 100644 (file)
@@ -14,6 +14,15 @@ class CustomHeadContentTest extends TestCase
         $resp->assertSee('console.log("cat")', false);
     }
 
+    public function test_content_wrapped_in_specific_html_comments()
+    {
+        // These comments are used to identify head content for editor injection
+        $this->setSettings(['app-custom-head' => '<script>console.log("cat");</script>']);
+        $resp = $this->get('/login');
+        $resp->assertSee('<!-- Start: custom user content -->', false);
+        $resp->assertSee('<!-- End: custom user content -->', false);
+    }
+
     public function test_configured_content_does_not_show_on_settings_page()
     {
         $this->setSettings(['app-custom-head' => '<script>console.log("cat");</script>']);