Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Console/User/ForceDeleteTest.php
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | public function testHandle(): void | ||||
$this->assertCount( | $this->assertCount( | ||||
0, | 0, | ||||
\App\Entitlement::withTrashed()->where('wallet_id', $wallet->id)->get() | \App\Entitlement::withTrashed()->where('wallet_id', $wallet->id)->get() | ||||
); | ); | ||||
$this->assertCount( | $this->assertCount( | ||||
0, | 0, | ||||
\App\Entitlement::withTrashed()->where('entitleable_id', $user->id)->get() | \App\Entitlement::withTrashed()->where('entitleable_id', $user->id)->get() | ||||
); | ); | ||||
$this->assertCount( | $this->assertCount( | ||||
0, | 0, | ||||
\App\Transaction::whereIn('object_id', $entitlements) | \App\Transaction::whereIn('object_id', $entitlements) | ||||
->where('object_type', \App\Entitlement::class) | ->where('object_type', \App\Entitlement::class) | ||||
->get() | ->get() | ||||
); | ); | ||||
// TODO: Test that it also deletes users in a group account | // TODO: Test that it also deletes users in a group account | ||||
} | } | ||||
} | } |