]> BookStack Code Mirror - bookstack/blobdiff - tests/Api/PagesApiTest.php
Update PWA manifest orientation to any
[bookstack] / tests / Api / PagesApiTest.php
index a1f65692f05822482047af88878c9d139746f0af..0d084472d1a43e0caf78136a78b07801b8c816ed 100644 (file)
@@ -32,38 +32,6 @@ class PagesApiTest extends TestCase
     }
 
     public function test_create_endpoint()
-    {
-        $this->actingAsApiEditor();
-        $book = $this->entities->book();
-        $details = [
-            'name'    => 'My API page',
-            'book_id' => $book->id,
-            'html'    => '<p>My new page content</p>',
-            'tags'    => [
-                [
-                    'name'  => 'tagname',
-                    'value' => 'tagvalue',
-                ],
-            ],
-        ];
-
-        $resp = $this->postJson($this->baseEndpoint, $details);
-        unset($details['html']);
-        $resp->assertStatus(200);
-        $newItem = Page::query()->orderByDesc('id')->where('name', '=', $details['name'])->first();
-        $resp->assertJson(array_merge($details, ['id' => $newItem->id, 'slug' => $newItem->slug]));
-        $this->assertDatabaseHas('tags', [
-            'entity_id'   => $newItem->id,
-            'entity_type' => $newItem->getMorphClass(),
-            'name'        => 'tagname',
-            'value'       => 'tagvalue',
-        ]);
-        $resp->assertSeeText('My new page content');
-        $resp->assertJsonMissing(['book' => []]);
-        $this->assertActivityExists('page_create', $newItem);
-    }
-
-    public function test_create_applies_correct_priority()
     {
         $this->actingAsApiEditor();
         $book = $this->entities->book();