]> BookStack Code Mirror - bookstack/blobdiff - tests/PublicActionTest.php
Fixed OIDC Logout
[bookstack] / tests / PublicActionTest.php
index 6f0e2f1d3bb4d886684af5e7ee3863926a552460..1e4dcbfb7b80df50c843ed6ff1e0bd591b2aec63 100644 (file)
@@ -207,4 +207,16 @@ class PublicActionTest extends TestCase
 
         $this->withHtml($resp)->assertLinkExists($page->getUrl('/edit'));
     }
+
+    public function test_public_user_cannot_view_or_update_their_profile()
+    {
+        $this->setSettings(['app-public' => 'true']);
+        $guest = $this->users->guest();
+
+        $resp = $this->get($guest->getEditUrl());
+        $this->assertPermissionError($resp);
+
+        $resp = $this->put($guest->getEditUrl(), ['name' => 'My new guest name']);
+        $this->assertPermissionError($resp);
+    }
 }