]> BookStack Code Mirror - bookstack/blobdiff - tests/Commands/ClearActivityCommandTest.php
Opensearch: Fixed XML declaration when php short tags enabled
[bookstack] / tests / Commands / ClearActivityCommandTest.php
index 71baa0ca667cb0a913074bd1ca95cf4ccb2b809a..a3d7456b68ebf427b6597d5cfbfacde0de06fc0e 100644 (file)
@@ -2,8 +2,7 @@
 
 namespace Tests\Commands;
 
-use BookStack\Actions\ActivityType;
-use BookStack\Entities\Models\Page;
+use BookStack\Activity\ActivityType;
 use BookStack\Facades\Activity;
 use Illuminate\Support\Facades\Artisan;
 use Illuminate\Support\Facades\DB;
@@ -14,14 +13,13 @@ class ClearActivityCommandTest extends TestCase
     public function test_clear_activity_command()
     {
         $this->asEditor();
-        /** @var Page $page */
-        $page = Page::query()->first();
+        $page = $this->entities->page();
         Activity::add(ActivityType::PAGE_UPDATE, $page);
 
         $this->assertDatabaseHas('activities', [
             'type'      => 'page_update',
-            'entity_id' => $page->id,
-            'user_id'   => $this->getEditor()->id,
+            'loggable_id' => $page->id,
+            'user_id'   => $this->users->editor()->id,
         ]);
 
         DB::rollBack();