From c1f8e585df3b5f0f6b8b9e4bbea9b64da9c5a191 Mon Sep 17 00:00:00 2001 From: Lucas Vinicius Date: Thu, 19 May 2022 18:55:44 -0300 Subject: [PATCH] Handle quote field on feature factory --- database/factories/FeatureFactory.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/database/factories/FeatureFactory.php b/database/factories/FeatureFactory.php index 40b2810..51eddfd 100644 --- a/database/factories/FeatureFactory.php +++ b/database/factories/FeatureFactory.php @@ -27,6 +27,7 @@ public function definition() PeriodicityType::Week, PeriodicityType::Day, ]), + 'quote' => false, ]; } @@ -40,9 +41,27 @@ public function consumable() public function notConsumable() { return $this->state(fn (array $attributes) => [ + 'quote' => false, 'consumable' => false, 'periodicity' => null, 'periodicity_type' => null, ]); } + + public function quote() + { + return $this->state(fn (array $attributes) => [ + 'consumable' => true, + 'quote' => true, + 'periodicity' => null, + 'periodicity_type' => null, + ]); + } + + public function notQuote() + { + return $this->state(fn (array $attributes) => [ + 'quote' => false, + ]); + } }