+ public function test_shelves_shows_in_header_if_have_any_shelve_view_permission()
+ {
+ $user = factory(User::class)->create();
+ $this->giveUserPermissions($user, ['image-create-all']);
+ $shelf = Bookshelf::first();
+ $userRole = $user->roles()->first();
+
+ $resp = $this->actingAs($user)->get('/');
+ $resp->assertElementNotContains('header', 'Shelves');
+
+ $this->setEntityRestrictions($shelf, ['view'], [$userRole]);
+
+ $resp = $this->get('/');
+ $resp->assertElementContains('header', 'Shelves');
+ }
+