]> BookStack Code Mirror - bookstack/blobdiff - tests/PublicActionTest.php
Add base64 image support
[bookstack] / tests / PublicActionTest.php
index 7caefd0ac45a5a1b9b9a5b21a3f89605fe4e3754..7dbf467bd838d8d82ece92e72b6b298ec0b88146 100644 (file)
@@ -8,6 +8,7 @@ use BookStack\Auth\User;
 use BookStack\Entities\Models\Book;
 use BookStack\Entities\Models\Chapter;
 use BookStack\Entities\Models\Page;
+use Illuminate\Support\Facades\View;
 
 class PublicActionTest extends TestCase
 {
@@ -115,10 +116,12 @@ class PublicActionTest extends TestCase
     public function test_content_not_listed_on_404_for_public_users()
     {
         $page = Page::query()->first();
+        $page->fill(['name' => 'my testing random unique page name'])->save();
         $this->asAdmin()->get($page->getUrl()); // Fake visit to show on recents
         $resp = $this->get('/cats/dogs/hippos');
         $resp->assertStatus(404);
         $resp->assertSee($page->name);
+        View::share('pageTitle', '');
 
         Auth::logout();
         $resp = $this->get('/cats/dogs/hippos');