+ $this->assertNotificationContains($redirectReq, 'Deleted ' . $itemCount . ' total items from the recycle bin');
+ }
+
+ public function test_permanent_delete_for_each_type()
+ {
+ /** @var Entity $entity */
+ foreach ([new Bookshelf(), new Book(), new Chapter(), new Page()] as $entity) {
+ $entity = $entity->newQuery()->first();
+ $this->asEditor()->delete($entity->getUrl());
+ $deletion = Deletion::query()->orderBy('id', 'desc')->firstOrFail();
+
+ $deleteReq = $this->asAdmin()->delete("/settings/recycle-bin/{$deletion->id}");
+ $deleteReq->assertRedirect('/settings/recycle-bin');
+ $this->assertDatabaseMissing('deletions', ['id' => $deletion->id]);
+ $this->assertDatabaseMissing($entity->getTable(), ['id' => $entity->id]);
+ }