Skip to content

Commit

Permalink
Handle quote field on feature factory
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasdotvin committed May 19, 2022
1 parent e5b3f24 commit c1f8e58
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions database/factories/FeatureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function definition()
PeriodicityType::Week,
PeriodicityType::Day,
]),
'quote' => false,
];
}

Expand All @@ -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,
]);
}
}

0 comments on commit c1f8e58

Please sign in to comment.