+
+ public function test_book_permissions_can_be_generated_without_error_if_child_chapter_is_in_recycle_bin()
+ {
+ $book = $this->entities->bookHasChaptersAndPages();
+ /** @var Chapter $chapter */
+ $chapter = $book->chapters()->first();
+
+ $this->asAdmin()->delete($chapter->getUrl());
+
+ $error = null;
+ try {
+ $this->entities->setPermissions($book, ['view'], []);
+ } catch (Exception $e) {
+ $error = $e;
+ }
+
+ $this->assertNull($error);
+ }