From b052d29a5f39affcd5f740ce1e60ea23534a1b4e Mon Sep 17 00:00:00 2001 From: DaneEveritt Date: Sat, 18 Jun 2022 14:25:24 -0400 Subject: [PATCH] Fix failing integration test --- .../Api/Client/Server/Backup/DeleteBackupTest.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/Integration/Api/Client/Server/Backup/DeleteBackupTest.php b/tests/Integration/Api/Client/Server/Backup/DeleteBackupTest.php index 05b709efa..b68b65e88 100644 --- a/tests/Integration/Api/Client/Server/Backup/DeleteBackupTest.php +++ b/tests/Integration/Api/Client/Server/Backup/DeleteBackupTest.php @@ -57,18 +57,7 @@ class DeleteBackupTest extends ClientApiIntegrationTestCase $backup->refresh(); $this->assertSoftDeleted($backup); - Event::assertDispatched(ActivityLogged::class, function (ActivityLogged $event) use ($backup, $user) { - $this->assertTrue($event->isServerEvent()); - $this->assertTrue($event->is('server:backup.delete')); - $this->assertTrue($user->is($event->actor())); - $this->assertCount(2, $event->model->subjects); - - $subjects = $event->model->subjects; - $this->assertCount(1, $subjects->filter(fn ($model) => $model->subject->is($backup))); - $this->assertCount(1, $subjects->filter(fn ($model) => $model->subject->is($backup->server))); - - return true; - }); + $this->assertActivityFor('server:backup.delete', $user, [$backup, $backup->server]); $this->actingAs($user)->deleteJson($this->link($backup))->assertStatus(Response::HTTP_NOT_FOUND); }