+ public function test_page_visible_if_has_permissions_when_book_not_visible()
+ {
+ $book = Book::first();
+
+ $this->setEntityRestrictions($book, []);
+
+ $bookChapter = $book->chapters->first();
+ $bookPage = $bookChapter->pages->first();
+ $this->setEntityRestrictions($bookPage, ['view']);
+
+ $this->actingAs($this->viewer);
+ $this->get($bookPage->getUrl());
+ $this->assertResponseOk();
+ $this->see($bookPage->name);
+ $this->dontSee(substr($book->name, 0, 15));
+ $this->dontSee(substr($bookChapter->name, 0, 15));
+ }
+