-<?php
+<?php namespace Tests;
-class PublicActionTest extends TestCase
+class PublicActionTest extends BrowserKitTest
{
public function test_app_not_public()
$this->visit($chapter->book->getUrl());
$this->visit($chapter->getUrl())
->click('New Page')
- ->see('Create Page')
+ ->see('New Page')
->seePageIs($chapter->getUrl('/create-page'));
$this->submitForm('Continue', [
]);
}
+ public function test_content_not_listed_on_404_for_public_users()
+ {
+ $page = \BookStack\Page::first();
+ $this->asAdmin()->visit($page->getUrl());
+ \Auth::logout();
+ view()->share('pageTitle', '');
+ $this->forceVisit('/cats/dogs/hippos');
+ $this->dontSee($page->name);
+ }
+
}
\ No newline at end of file