+
+ public function test_sort_book_action_visible_if_permissions_allow()
+ {
+ $chapter = $this->entities->chapter();
+
+ $resp = $this->actingAs($this->users->viewer())->get($chapter->getUrl());
+ $this->withHtml($resp)->assertLinkNotExists($chapter->book->getUrl('sort'));
+
+ $resp = $this->asEditor()->get($chapter->getUrl());
+ $this->withHtml($resp)->assertLinkExists($chapter->book->getUrl('sort'));
+ }