Fix failing integration test
This commit is contained in:
parent
7224ca81de
commit
b052d29a5f
1 changed files with 1 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue