]> BookStack Code Mirror - bookstack/blobdiff - tests/Uploads/DrawioTest.php
Copied over work from user_permissions branch
[bookstack] / tests / Uploads / DrawioTest.php
index 2ed4da7cadc6a9ff65525e6afb5b623c737709a6..080f05d7402f8971db9eff17d0d86459b03124bb 100644 (file)
@@ -30,7 +30,7 @@ class DrawioTest extends TestCase
     public function test_drawing_base64_upload()
     {
         $page = Page::first();
-        $editor = $this->getEditor();
+        $editor = $this->users->editor();
         $this->actingAs($editor);
 
         $upload = $this->postJson('images/drawio', [
@@ -58,7 +58,7 @@ class DrawioTest extends TestCase
     {
         config()->set('services.drawio', 'http://cats.com?dog=tree');
         $page = Page::first();
-        $editor = $this->getEditor();
+        $editor = $this->users->editor();
 
         $resp = $this->actingAs($editor)->get($page->getUrl('/edit'));
         $resp->assertSee('drawio-url="http://cats.com?dog=tree"', false);
@@ -68,7 +68,7 @@ class DrawioTest extends TestCase
     {
         config()->set('services.drawio', true);
         $page = Page::first();
-        $editor = $this->getEditor();
+        $editor = $this->users->editor();
 
         $resp = $this->actingAs($editor)->get($page->getUrl('/edit'));
         $resp->assertSee('drawio-url="https://embed.diagrams.net/?embed=1&proto=json&spin=1&configure=1"', false);