public function test_restoring_category_inheritance_builds_inheritance_chain()
 {
     $parent = Factory::create(new Category(), ['is_inheriting' => false]);
     $child = Factory::create(new Category(), ['parent_id' => $parent->id, 'is_inheriting' => true]);
     $grandchild = Factory::create(new Category(), ['parent_id' => $child->id]);
     $parent->is_inheriting = true;
     $parent->save();
     $this->assertTrue(Category::isInheritedBy($parent)->find($child->id)->exists());
     $this->assertTrue(Category::isInheritedBy($parent)->find($grandchild->id)->exists());
 }